forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
netfilter: nf_nat: make unique_tuple return void
The only user of unique_tuple() get_unique_tuple() doesn't care about the return value of unique_tuple(), so make unique_tuple() return void (nothing). Signed-off-by: Changli Gao <[email protected]> Signed-off-by: Patrick McHardy <[email protected]>
- Loading branch information
Showing
10 changed files
with
30 additions
and
32 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ MODULE_AUTHOR("Harald Welte <[email protected]>"); | |
MODULE_DESCRIPTION("Netfilter NAT protocol helper module for GRE"); | ||
|
||
/* generate unique tuple ... */ | ||
static bool | ||
static void | ||
gre_unique_tuple(struct nf_conntrack_tuple *tuple, | ||
const struct nf_nat_range *range, | ||
enum nf_nat_manip_type maniptype, | ||
|
@@ -50,7 +50,7 @@ gre_unique_tuple(struct nf_conntrack_tuple *tuple, | |
/* If there is no master conntrack we are not PPTP, | ||
do not change tuples */ | ||
if (!ct->master) | ||
return false; | ||
return; | ||
|
||
if (maniptype == IP_NAT_MANIP_SRC) | ||
keyptr = &tuple->src.u.gre.key; | ||
|
@@ -71,11 +71,11 @@ gre_unique_tuple(struct nf_conntrack_tuple *tuple, | |
for (i = 0; i < range_size; i++, key++) { | ||
*keyptr = htons(min + key % range_size); | ||
if (!nf_nat_used_tuple(tuple, ct)) | ||
return true; | ||
return; | ||
} | ||
|
||
pr_debug("%p: no NAT mapping\n", ct); | ||
return false; | ||
return; | ||
} | ||
|
||
/* manipulate a GRE packet according to maniptype */ | ||
|
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
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