Date: Tue, 5 Jun 2012 11:24:06 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r236607 - stable/8/sys/netinet6 Message-ID: <201206051124.q55BO62d016309@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206051124.q55BO62d016309>