summaryrefslogtreecommitdiffstats
path: root/sys/netpfil
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2014-05-26 07:02:03 +0000
committerae <ae@FreeBSD.org>2014-05-26 07:02:03 +0000
commit7d6d803f86e6e88e96afe51821f7e437b117768e (patch)
treeedbf1d6516d77fa52997c073b97a22cd3741b41e /sys/netpfil
parentbd6a1fd1cd63fd7502ab11fb5861ebc0c10c68ff (diff)
downloadFreeBSD-src-7d6d803f86e6e88e96afe51821f7e437b117768e.zip
FreeBSD-src-7d6d803f86e6e88e96afe51821f7e437b117768e.tar.gz
MFC r266399:
Since ipfw nat configures all options in one step, we should set all bits in the mask when calling LibAliasSetMode() to properly clear unneeded options. PR: 189655
Diffstat (limited to 'sys/netpfil')
-rw-r--r--sys/netpfil/ipfw/ip_fw_nat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netpfil/ipfw/ip_fw_nat.c b/sys/netpfil/ipfw/ip_fw_nat.c
index 70e3647..0fb4534 100644
--- a/sys/netpfil/ipfw/ip_fw_nat.c
+++ b/sys/netpfil/ipfw/ip_fw_nat.c
@@ -441,7 +441,7 @@ ipfw_nat_cfg(struct sockopt *sopt)
ptr->ip = cfg->ip;
ptr->redir_cnt = cfg->redir_cnt;
ptr->mode = cfg->mode;
- LibAliasSetMode(ptr->lib, cfg->mode, cfg->mode);
+ LibAliasSetMode(ptr->lib, cfg->mode, ~0);
LibAliasSetAddress(ptr->lib, ptr->ip);
memcpy(ptr->if_name, cfg->if_name, IF_NAMESIZE);
OpenPOWER on IntegriCloud