svn commit: r231740 - stable/8/sys/net
Kevin Lo
kevlo at FreeBSD.org
Wed Feb 15 05:35:37 UTC 2012
Author: kevlo
Date: Wed Feb 15 05:35:37 2012
New Revision: 231740
URL: http://svn.freebsd.org/changeset/base/231740
Log:
MFC r224703:
In rtinit1(), before rtrequest1_fib() is called, info.rti_flags is
initialized by flags (function argument) or-ed with ifa->ifa_flags.
If both NIC has a loopback route to itself, so IFA_RTSELF is set on ifa(s).
As IFA_RTSELF is defined by RTF_HOST, rtrequest1_fib() is called with
RTF_HOST flag even if netmask is not NULL. Consequently, netmask is set
to zero in rtrequest1_fib(), and request to add network route is changed
under hands to request to add host route.
Tested by: Andrew Boyer <aboyer at averesystems.com>
Submitted by: Svatopluk Kraus <onwahe at gmail dot com>
Modified:
stable/8/sys/net/route.c
Modified: stable/8/sys/net/route.c
==============================================================================
--- stable/8/sys/net/route.c Wed Feb 15 04:09:43 2012 (r231739)
+++ stable/8/sys/net/route.c Wed Feb 15 05:35:37 2012 (r231740)
@@ -1483,7 +1483,7 @@ rtinit1(struct ifaddr *ifa, int cmd, int
*/
bzero((caddr_t)&info, sizeof(info));
info.rti_ifa = ifa;
- info.rti_flags = flags | ifa->ifa_flags;
+ info.rti_flags = flags | (ifa->ifa_flags & ~IFA_RTSELF);
info.rti_info[RTAX_DST] = dst;
/*
* doing this for compatibility reasons
More information about the svn-src-stable
mailing list