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
This commit is contained in:
Andrey V. Elsukov 2014-05-18 14:25:19 +00:00
parent 3b4c173b83
commit 3a5db2d492

View File

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