svn commit: r236606 - stable/9/sys/netinet6
Bjoern A. Zeeb
bz at FreeBSD.org
Tue Jun 5 11:23:57 UTC 2012
Author: bz
Date: Tue Jun 5 11:23:56 2012
New Revision: 236606
URL: http://svn.freebsd.org/changeset/base/236606
Log:
MFC r236327 (by emax):
When we return deprecated addresses, we need to reference them.
Modified:
stable/9/sys/netinet6/in6.c
Directory Properties:
stable/9/sys/ (props changed)
Modified: stable/9/sys/netinet6/in6.c
==============================================================================
--- stable/9/sys/netinet6/in6.c Tue Jun 5 10:23:41 2012 (r236605)
+++ stable/9/sys/netinet6/in6.c Tue Jun 5 11:23:56 2012 (r236606)
@@ -2236,14 +2236,20 @@ in6_ifawithifp(struct ifnet *ifp, struct
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;
}
More information about the svn-src-stable
mailing list