diff options
Diffstat (limited to 'sys/netinet/in.c')
-rw-r--r-- | sys/netinet/in.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/netinet/in.c b/sys/netinet/in.c index 170a343..7242545 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -48,6 +48,7 @@ #include <netinet/in.h> #include <netinet/in_var.h> +#include <netinet/in_pcb.h> #include <netinet/igmp_var.h> @@ -68,6 +69,9 @@ SYSCTL_INT(_net_inet_ip, OID_AUTO, subnets_are_local, CTLFLAG_RW, struct in_multihead in_multihead; /* XXX BSS initialization */ +extern struct inpcbinfo ripcbinfo; +extern struct inpcbinfo udbinfo; + /* * Return 1 if an internet address is for a ``local'' host * (one to which we have a connection). If subnetsarelocal @@ -402,6 +406,14 @@ in_control(so, cmd, data, ifp, p) * a routing process they will come back. */ in_ifadown(&ia->ia_ifa, 1); + /* + * XXX horrible hack to detect that we are being called + * from if_detach() + */ + if (!ifnet_addrs[ifp->if_index - 1]) { + in_pcbpurgeif0(LIST_FIRST(ripcbinfo.listhead), ifp); + in_pcbpurgeif0(LIST_FIRST(udbinfo.listhead), ifp); + } /* * Protect from ipintr() traversing address list |