From e060599533305d04d652d2f055850e47b7b69662 Mon Sep 17 00:00:00 2001 From: brian Date: Tue, 23 Nov 1999 22:30:01 +0000 Subject: Only emit the ``wrong ifa'' message if the matching interface is neither IFF_LOOPBACK or IFF_POINTOPOINT. It's quite common (and probably more correct) to route local IP numbers via lo0 and it makes configuration easier to assign the hostname address to local POINTOPOINT links too. This message usually remains hidden because the loopback interface gets the highest interface number at boot time, but when the ethernet interface is added later, the message can get pretty annoying. Also, fix a typo. Not objected to by: freebsd-net --- sys/net/route.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sys/net/route.c') diff --git a/sys/net/route.c b/sys/net/route.c index 782c471..ea1a579 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -1042,8 +1042,10 @@ rtinit(ifa, cmd, flags) * have already existed or something. (XXX) */ if (rt->rt_ifa != ifa) { - printf("rtinit: wrong ifa (%p) was (%p)\n", ifa, - rt->rt_ifa); + if (!(rt->rt_ifa->ifa_ifp->if_flags & + (IFF_POINTOPOINT|IFF_LOOPBACK))) + printf("rtinit: wrong ifa (%p) was (%p)\n", + ifa, rt->rt_ifa); /* * Ask that the protocol in question * remove anything it has associated with @@ -1052,7 +1054,7 @@ rtinit(ifa, cmd, flags) if (rt->rt_ifa->ifa_rtrequest) rt->rt_ifa->ifa_rtrequest(RTM_DELETE, rt, SA(0)); /* - * Remove the referenve to the it's ifaddr. + * Remove the reference to its ifaddr. */ IFAFREE(rt->rt_ifa); /* -- cgit v1.1