diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-08-18 08:48:37 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-08-18 08:48:37 +0000 |
commit | 65e0c487d2c01a380418a7e665df48b74cc932e0 (patch) | |
tree | 555401acc1681c25d56436025a9770229ae72974 /sys/netinet6 | |
parent | 30e2bac16499ed22a3c0ae02be09dde4e00cccf4 (diff) |
Check the error value returned by in6_ifattach().
Prodded by and ok bluhm@
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/in6.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 91d2703e604..3e39d99e8a8 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6.c,v 1.162 2015/08/12 09:06:18 mpi Exp $ */ +/* $OpenBSD: in6.c,v 1.163 2015/08/18 08:48:36 mpi Exp $ */ /* $KAME: in6.c,v 1.372 2004/06/14 08:14:21 itojun Exp $ */ /* @@ -479,7 +479,11 @@ in6_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp) * is no link-local yet. */ s = splsoftnet(); - in6_ifattach(ifp); + error = in6_ifattach(ifp); + if (error != 0) { + splx(s); + return (error); + } error = in6_update_ifa(ifp, ifra, ia6); splx(s); if (error != 0) |