summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorkevlo <kevlo@FreeBSD.org>2011-08-08 05:25:51 +0000
committerkevlo <kevlo@FreeBSD.org>2011-08-08 05:25:51 +0000
commitc7105822b4f372064af7bf4976d10c38e78cdd9c (patch)
tree54a38dd16508440f2dbf329693143ff01267d590 /sys/net
parent5e1d62adc3a8d4a0ec2eeb8144e9243fc6990065 (diff)
downloadFreeBSD-src-c7105822b4f372064af7bf4976d10c38e78cdd9c.zip
FreeBSD-src-c7105822b4f372064af7bf4976d10c38e78cdd9c.tar.gz
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> Approved by: re (hrs)
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/route.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/net/route.c b/sys/net/route.c
index 9c7dfac..d42b4c7 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -1478,7 +1478,7 @@ rtinit1(struct ifaddr *ifa, int cmd, int flags, int fibnum)
*/
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
OpenPOWER on IntegriCloud