From 50a7b0b9b40d5ba0fbc3dd204728fcdb984fe27b Mon Sep 17 00:00:00 2001 From: ru Date: Fri, 13 Jun 2003 22:15:42 +0000 Subject: If the -proxy_only option is used, the -alias_address/-interface options are not required. Suggested by: Vaclav Petricek MFC after: 2 weeks --- sbin/natd/natd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sbin/natd/natd.c') diff --git a/sbin/natd/natd.c b/sbin/natd/natd.c index 38f923f..40f68c2 100644 --- a/sbin/natd/natd.c +++ b/sbin/natd/natd.c @@ -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) -- cgit v1.1