From f7ffd5a8c158f3553569b7ece37d464fe2b68a68 Mon Sep 17 00:00:00 2001 From: ae Date: Mon, 26 May 2014 07:02:03 +0000 Subject: [PATCH] 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 git-svn-id: svn://svn.freebsd.org/base/stable/10@266678 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/netpfil/ipfw/ip_fw_nat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/ipfw/ip_fw_nat.c b/sys/netpfil/ipfw/ip_fw_nat.c index 70e364769..0fb4534bb 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); -- 2.45.0