forked from cilium/cilium
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bpf: nat: Handle errors from snat_v(4|6)_prepare_state()
Functions snat_v4_prepare_state() and snat_v6_prepare_state() woule return a boolean, indicating whether SNAT should happen. They would not report errors that might occur when trying to determine that. In this commit, we change their return type to an int, in order to report any error to the caller. We report errors if any of revalidate_data(), ct_is_reply4(), ct_is_reply6(), or ipv6_hdrlen() fails. Suggested-by: Julian Wiedmann <jwi@isovalent.com> Signed-off-by: Quentin Monnet <quentin@isovalent.com>
- Loading branch information
Showing
3 changed files
with
51 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters