Make the checks for ptp interfaces in ifa_ifwithdstaddr() and
ifa_ifwithnet() look more similar by comparing the pointer to NULL in both cases. MFC after: 3 months
This commit is contained in:
parent
878f530ff8
commit
f0c042211b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=182106
@ -1154,7 +1154,7 @@ ifa_ifwithdstaddr(struct sockaddr *addr)
|
||||
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
|
||||
if (ifa->ifa_addr->sa_family != addr->sa_family)
|
||||
continue;
|
||||
if (ifa->ifa_dstaddr &&
|
||||
if (ifa->ifa_dstaddr != NULL &&
|
||||
sa_equal(addr, ifa->ifa_dstaddr))
|
||||
goto done;
|
||||
}
|
||||
@ -1208,7 +1208,7 @@ next: continue;
|
||||
* The trouble is that we don't know the
|
||||
* netmask for the remote end.
|
||||
*/
|
||||
if (ifa->ifa_dstaddr != 0 &&
|
||||
if (ifa->ifa_dstaddr != NULL &&
|
||||
sa_equal(addr, ifa->ifa_dstaddr))
|
||||
goto done;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user