summaryrefslogtreecommitdiff
path: root/sys/netinet6
diff options
context:
space:
mode:
authorMarco Pfatschbacher <mpf@cvs.openbsd.org>2006-10-31 12:49:46 +0000
committerMarco Pfatschbacher <mpf@cvs.openbsd.org>2006-10-31 12:49:46 +0000
commit783f6e58f6e86d87416e197fb7f5cbcefdbba96d (patch)
treeee32292819ac4368f6b24080d7d6df894d326703 /sys/netinet6
parentef6f8ea91bcd90d52a9c1661975df3653e74bf84 (diff)
Only run address hooks on SIOCAIFADDR_IN6 and SIOCDIFADDR_IN6.
Before a normal user running ifconfig(8) could trigger up to three address hook calls per interface. OK mcbride@, henning@
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/in6.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index 3898bf493ae..e3dfb09d88a 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6.c,v 1.68 2006/08/28 17:29:53 mcbride Exp $ */
+/* $OpenBSD: in6.c,v 1.69 2006/10/31 12:49:45 mpf Exp $ */
/* $KAME: in6.c,v 1.372 2004/06/14 08:14:21 itojun Exp $ */
/*
@@ -707,6 +707,7 @@ in6_control(so, cmd, data, ifp, p)
*/
pfxlist_onlink_check();
+ dohooks(ifp->if_addrhooks, 0);
break;
}
@@ -747,6 +748,7 @@ in6_control(so, cmd, data, ifp, p)
in6_purgeaddr(&ia->ia_ifa);
if (pr && purgeprefix)
prelist_remove(pr);
+ dohooks(ifp->if_addrhooks, 0);
break;
}
@@ -756,7 +758,6 @@ in6_control(so, cmd, data, ifp, p)
return ((*ifp->if_ioctl)(ifp, cmd, data));
}
- dohooks(ifp->if_addrhooks, 0);
return (0);
}