Author: bz Date: Tue Jun 5 11:24:05 2012 New Revision: 236607 URL: http://svn.freebsd.org/changeset/base/236607
Log: MFC r236327 (by emax): When we return deprecated addresses, we need to reference them. Modified: stable/8/sys/netinet6/in6.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/netinet6/in6.c ============================================================================== --- stable/8/sys/netinet6/in6.c Tue Jun 5 11:23:56 2012 (r236606) +++ stable/8/sys/netinet6/in6.c Tue Jun 5 11:24:05 2012 (r236607) @@ -2151,14 +2151,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; } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"