Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 May 2014 14:25:19 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r266399 - head/sys/netpfil/ipfw
Message-ID:  <201405181425.s4IEPJgN037549@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Sun May 18 14:25:19 2014
New Revision: 266399
URL: http://svnweb.freebsd.org/changeset/base/266399

Log:
  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
  MFC after:	1 week
  Sponsored by:	Yandex LLC

Modified:
  head/sys/netpfil/ipfw/ip_fw_nat.c

Modified: head/sys/netpfil/ipfw/ip_fw_nat.c
==============================================================================
--- head/sys/netpfil/ipfw/ip_fw_nat.c	Sun May 18 14:18:23 2014	(r266398)
+++ head/sys/netpfil/ipfw/ip_fw_nat.c	Sun May 18 14:25:19 2014	(r266399)
@@ -443,7 +443,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);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405181425.s4IEPJgN037549>