diff options
author | bz <bz@FreeBSD.org> | 2012-07-08 08:49:37 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2012-07-08 08:49:37 +0000 |
commit | 23dfdbf152d6bb60514603ffb020298ff3d484a0 (patch) | |
tree | 1de069477bf440aa6e6997cf18741191961e44bc /sys/netinet6/in6.c | |
parent | e3b83ca591d26ef54da73e627a2e52aaebe75415 (diff) | |
download | FreeBSD-src-23dfdbf152d6bb60514603ffb020298ff3d484a0.zip FreeBSD-src-23dfdbf152d6bb60514603ffb020298ff3d484a0.tar.gz |
As mentioned in the commit message of r237571 (copied from a prototype
patch of mine) also check if the 2nd in6_setscope() failed and return
the error in that case.
MFC after: 5 days
Diffstat (limited to 'sys/netinet6/in6.c')
-rw-r--r-- | sys/netinet6/in6.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 713e532..960b887 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -1367,7 +1367,9 @@ in6_purgeaddr_mc(struct ifnet *ifp, struct in6_ifaddr *ia, struct ifaddr *ifa0) sin6.sin6_family = AF_INET6; memcpy(&sin6.sin6_addr, &satosin6(ifa0->ifa_addr)->sin6_addr, sizeof(sin6.sin6_addr)); - in6_setscope(&sin6.sin6_addr, ifa0->ifa_ifp, NULL); + error = in6_setscope(&sin6.sin6_addr, ifa0->ifa_ifp, NULL); + if (error != 0) + return (error); } rt = in6_rtalloc1((struct sockaddr *)&mltaddr, 0, 0UL, RT_DEFAULT_FIB); |