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
This commit is contained in:
parent
5cb2cd9453
commit
a86ab8174f
@ -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);
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user