mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-18 02:19:39 +00:00
If the -proxy_only option is used, the -alias_address/-interface
options are not required. Suggested by: Vaclav Petricek MFC after: 2 weeks
This commit is contained in:
parent
0800731a79
commit
3d23e8b897
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=116319
@ -315,9 +315,12 @@ will be used as a default.
|
||||
Use
|
||||
.Ar address
|
||||
as the aliasing address.
|
||||
If this option is not specified, the
|
||||
Either this or the
|
||||
.Fl interface
|
||||
option must be used.
|
||||
option must be used (but not both),
|
||||
if the
|
||||
.Fl proxy_only
|
||||
option is not specified.
|
||||
The specified address is usually the address assigned to the
|
||||
.Dq public
|
||||
network interface.
|
||||
|
@ -169,9 +169,11 @@ int main (int argc, char** argv)
|
||||
openlog ("natd", LOG_CONS | LOG_PID | (verbose ? LOG_PERROR : 0),
|
||||
logFacility);
|
||||
/*
|
||||
* Check that valid aliasing address has been given.
|
||||
* If not doing the transparent proxying only,
|
||||
* check that valid aliasing address has been given.
|
||||
*/
|
||||
if (aliasAddr.s_addr == INADDR_NONE && ifName == NULL)
|
||||
if (aliasAddr.s_addr == INADDR_NONE && ifName == NULL &&
|
||||
!(PacketAliasSetMode(0,0) & PKT_ALIAS_PROXY_ONLY))
|
||||
errx (1, "aliasing address not given");
|
||||
|
||||
if (aliasAddr.s_addr != INADDR_NONE && ifName != NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user