diff options
author | 2000-04-21 11:42:23 +0000 | |
---|---|---|
committer | 2000-04-21 11:42:23 +0000 | |
commit | 1a978a9763048dc163f33e8d29e6f6de23f53205 (patch) | |
tree | ddf19082896ef8a665e506a693b04e78ab7854bc | |
parent | even more from base to etc; everything else looks right (diff) | |
download | wireguard-openbsd-1a978a9763048dc163f33e8d29e6f6de23f53205.tar.xz wireguard-openbsd-1a978a9763048dc163f33e8d29e6f6de23f53205.zip |
NRL pcb issue; inp_{f,l}addr{,6} is a union so we need to be sure about
af match.
- do not touch IPv4 pcb entries on in6_pcbnotify.
- do not touch IPv6 pcb entries on in_pcbnotify.
-rw-r--r-- | sys/netinet/in_pcb.c | 10 | ||||
-rw-r--r-- | sys/netinet6/in6_pcb.c | 6 |
2 files changed, 14 insertions, 2 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index d6e89ff201c..99b6654fb2a 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in_pcb.c,v 1.40 2000/01/04 10:39:21 itojun Exp $ */ +/* $OpenBSD: in_pcb.c,v 1.41 2000/04/21 11:42:23 itojun Exp $ */ /* $NetBSD: in_pcb.c,v 1.25 1996/02/13 23:41:53 christos Exp $ */ /* @@ -647,6 +647,10 @@ in_pcbnotify(table, dst, fport_arg, laddr, lport_arg, errno, notify) for (inp = table->inpt_queue.cqh_first; inp != (struct inpcb *)&table->inpt_queue;) { +#ifdef INET6 + if (inp->inp_flags & INP_IPV6) + continue; +#endif if (inp->inp_faddr.s_addr != faddr.s_addr || inp->inp_socket == 0 || inp->inp_fport != fport || @@ -688,6 +692,10 @@ in_pcbnotifyall(table, dst, errno, notify) for (inp = table->inpt_queue.cqh_first; inp != (struct inpcb *)&table->inpt_queue;) { +#ifdef INET6 + if (inp->inp_flags & INP_IPV6) + continue; +#endif if (inp->inp_faddr.s_addr != faddr.s_addr || inp->inp_socket == 0) { inp = inp->inp_queue.cqe_next; diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 4779e5e20b5..76c3292c342 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6_pcb.c,v 1.10 2000/02/28 11:55:22 itojun Exp $ */ +/* $OpenBSD: in6_pcb.c,v 1.11 2000/04/21 11:42:25 itojun Exp $ */ /* %%% copyright-nrl-95 @@ -566,6 +566,10 @@ in6_pcbnotify(head, dst, fport_arg, la, lport_arg, cmd, notify) for (inp = head->inpt_queue.cqh_first; inp != (struct inpcb *)&head->inpt_queue;) { +#ifdef INET6 + if (!(inp->inp_flags & INP_IPV6)) + continue; +#endif if (!IN6_ARE_ADDR_EQUAL(&inp->inp_faddr6, faddr) || !inp->inp_socket || (lport && inp->inp_lport != lport) || |