svn commit: r266399 - head/sys/netpfil/ipfw

Andrey V. Elsukov ae at FreeBSD.org
Sun May 18 14:25:20 UTC 2014


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);
 


More information about the svn-src-all mailing list