Date: Mon, 18 Apr 2011 23:45:50 +0000 (UTC) From: Maxim Sobolev <sobomax@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r220808 - head/sbin/natd Message-ID: <201104182345.p3INjo7Y088486@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sobomax Date: Mon Apr 18 23:45:50 2011 New Revision: 220808 URL: http://svn.freebsd.org/changeset/base/220808 Log: Furthermore condition IP waiting behaviour also on -dynamic flag. This should preserve POLA in all other cases (foreground || non-dynamic). MFC after: 2 weeks Modified: head/sbin/natd/natd.c Modified: head/sbin/natd/natd.c ============================================================================== --- head/sbin/natd/natd.c Mon Apr 18 23:35:16 2011 (r220807) +++ head/sbin/natd/natd.c Mon Apr 18 23:45:50 2011 (r220808) @@ -305,9 +305,11 @@ int main (int argc, char** argv) else { do { rval = SetAliasAddressFromIfName (mip->ifName); - if (background != 0 && rval == EAGAIN) + if (background == 0 || dynamicMode == 0) + break; + if (rval == EAGAIN) sleep(1); - } while (background != 0 && rval == EAGAIN); + } while (rval == EAGAIN); if (rval != 0) exit(1); } @@ -648,9 +650,11 @@ static void DoAliasing (int fd, int dire if (mip->assignAliasAddr) { do { rval = SetAliasAddressFromIfName (mip->ifName); - if (background != 0 && rval == EAGAIN) + if (background == 0 || dynamicMode == 0) + break; + if (rval == EAGAIN) sleep(1); - } while (background != 0 && rval == EAGAIN); + } while (rval == EAGAIN); if (rval != 0) exit(1); mip->assignAliasAddr = 0;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104182345.p3INjo7Y088486>