mirror of
https://github.com/opnsense/src.git
synced 2026-05-25 18:54:02 -04:00
ipfilter: Avoid more null if-then-else blocks
As in73db3b64f1, when WITHOUT_INET6 is selected, null if-then-else blocks are generated because #if statements are incorrectly placed. Moving the #if statements reduces unnecessary runtime comparisons or compiler optimizations. (cherry picked from commit130df64793)
This commit is contained in:
parent
2d120650d3
commit
fdf2f69042
1 changed files with 2 additions and 2 deletions
|
|
@ -1367,8 +1367,8 @@ ipf_proxy_rule_rev(nat)
|
|||
if (ipn->in_v[0] == 4) {
|
||||
ipn->in_snip = ntohl(nat->nat_odstaddr);
|
||||
ipn->in_dnip = ntohl(nat->nat_osrcaddr);
|
||||
} else {
|
||||
#ifdef USE_INET6
|
||||
} else {
|
||||
ipn->in_snip6 = nat->nat_odst6;
|
||||
ipn->in_dnip6 = nat->nat_osrc6;
|
||||
#endif
|
||||
|
|
@ -1443,8 +1443,8 @@ ipf_proxy_rule_fwd(nat)
|
|||
if (ipn->in_v[0] == 4) {
|
||||
ipn->in_snip = ntohl(nat->nat_nsrcaddr);
|
||||
ipn->in_dnip = ntohl(nat->nat_ndstaddr);
|
||||
} else {
|
||||
#ifdef USE_INET6
|
||||
} else {
|
||||
ipn->in_snip6 = nat->nat_nsrc6;
|
||||
ipn->in_dnip6 = nat->nat_ndst6;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue