From a458eaa039f041c8bf534a73ee1f340c56237085 Mon Sep 17 00:00:00 2001 From: Qing Li Date: Sun, 12 Sep 2010 18:04:47 +0000 Subject: [PATCH] Adding an address on an interface also requires the loopback route to that address be installed. PR: kern/150481 Submitted by: Ingo Flaschberger MFC after: 5 days --- sys/netinet/raw_ip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c index d6b426c9a486..c91d4a9da9f7 100644 --- a/sys/netinet/raw_ip.c +++ b/sys/netinet/raw_ip.c @@ -741,6 +741,8 @@ rip_ctlinput(int cmd, struct sockaddr *sa, void *vip) if (err == 0) ia->ia_flags |= IFA_ROUTE; err = ifa_add_loopback_route((struct ifaddr *)ia, sa); + if (err == 0) + ia->ia_flags |= IFA_RTSELF; ifa_free(&ia->ia_ifa); break; }