diff options
author | brian <brian@FreeBSD.org> | 1999-11-23 22:30:01 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1999-11-23 22:30:01 +0000 |
commit | e060599533305d04d652d2f055850e47b7b69662 (patch) | |
tree | 4d53bc17c9f75140985155334dbcfa18fd46db9d | |
parent | 8cdd84c50e42265cfdec9f30de3346eedb600389 (diff) | |
download | FreeBSD-src-e060599533305d04d652d2f055850e47b7b69662.zip FreeBSD-src-e060599533305d04d652d2f055850e47b7b69662.tar.gz |
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
-rw-r--r-- | sys/net/route.c | 8 |
1 files changed, 5 insertions, 3 deletions
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); /* |