Date: Sun, 28 Aug 2011 00:14:40 +0000 (UTC) From: Qing Li <qingli@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r225223 - head/sys/netinet Message-ID: <201108280014.p7S0Eec7026607@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: qingli Date: Sun Aug 28 00:14:40 2011 New Revision: 225223 URL: http://svn.freebsd.org/changeset/base/225223 Log: When an interface address route is removed from the system, another route with the same prefix is searched for as a replacement. The current code did not bypass routes that have non-operational interfaces. This patch fixes that bug and will find a replacement route with an active interface. PR: kern/159603 Submitted by: pluknet, ambrisko at ambrisko dot com Reviewed by: discussed on net@ Approved by: re (bz) MFC after: 3 days Modified: head/sys/netinet/in.c Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Sat Aug 27 22:10:53 2011 (r225222) +++ head/sys/netinet/in.c Sun Aug 28 00:14:40 2011 (r225223) @@ -1163,7 +1163,8 @@ in_scrubprefix(struct in_ifaddr *target, p.s_addr &= ia->ia_sockmask.sin_addr.s_addr; } - if (prefix.s_addr != p.s_addr) + if ((prefix.s_addr != p.s_addr) || + !(ia->ia_ifp->if_flags & IFF_UP)) continue; /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108280014.p7S0Eec7026607>