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
This commit is contained in:
ae 2014-05-26 07:02:03 +00:00
parent bd6a1fd1cd
commit 7d6d803f86

View File

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