mirror of
https://github.com/openbsd/src.git
synced 2025-01-10 06:47:55 -08:00
Clear ifindex2ifnet[] in if_detach() this is needed because link local
addressing in IPv6 likes to do ifp = ifindex2ifnet[ifindex] without properly checking if the ifindex is valid. As a side-effect this solves parts of PR 5981. Debugged by jsing@. OK jsing@, deraadt@
This commit is contained in:
parent
4aa892c616
commit
2d6ec8084b
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: if.c,v 1.173 2008/06/12 16:15:05 claudio Exp $ */
|
||||
/* $OpenBSD: if.c,v 1.174 2008/11/10 18:08:42 claudio Exp $ */
|
||||
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
@ -636,6 +636,7 @@ do { \
|
||||
/* Announce that the interface is gone. */
|
||||
rt_ifannouncemsg(ifp, IFAN_DEPARTURE);
|
||||
|
||||
ifindex2ifnet[ifp->if_index] = NULL;
|
||||
splx(s);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user