When we return deprecated addresses, we need to reference them.
Reviewed by: bz, scottl MFC after: 3 days
This commit is contained in:
parent
691df1a1f8
commit
c784f9e5eb
@ -2265,14 +2265,20 @@ in6_ifawithifp(struct ifnet *ifp, struct in6_addr *dst)
|
||||
IF_ADDR_RUNLOCK(ifp);
|
||||
return (struct in6_ifaddr *)ifa;
|
||||
}
|
||||
IF_ADDR_RUNLOCK(ifp);
|
||||
|
||||
/* use the last-resort values, that are, deprecated addresses */
|
||||
if (dep[0])
|
||||
if (dep[0]) {
|
||||
ifa_ref((struct ifaddr *)dep[0]);
|
||||
IF_ADDR_RUNLOCK(ifp);
|
||||
return dep[0];
|
||||
if (dep[1])
|
||||
}
|
||||
if (dep[1]) {
|
||||
ifa_ref((struct ifaddr *)dep[1]);
|
||||
IF_ADDR_RUNLOCK(ifp);
|
||||
return dep[1];
|
||||
}
|
||||
|
||||
IF_ADDR_RUNLOCK(ifp);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user