diff options
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/in_pcb.c | 19 | ||||
-rw-r--r-- | sys/netinet/in_pcb.h | 4 | ||||
-rw-r--r-- | sys/netinet/tcp_input.c | 4 | ||||
-rw-r--r-- | sys/netinet/tcp_usrreq.c | 4 | ||||
-rw-r--r-- | sys/netinet/udp_usrreq.c | 4 |
5 files changed, 21 insertions, 14 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 599c712c690..ad69036f1c5 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in_pcb.c,v 1.97 2008/05/09 03:14:07 markus Exp $ */ +/* $OpenBSD: in_pcb.c,v 1.98 2008/05/15 19:40:38 markus Exp $ */ /* $NetBSD: in_pcb.c,v 1.25 1996/02/13 23:41:53 christos Exp $ */ /* @@ -1083,17 +1083,24 @@ in_pcblookup_listen(struct inpcbtable *table, struct in_addr laddr, #ifdef INET6 struct inpcb * -in6_pcblookup_listen(table, laddr, lport_arg, reverse) - struct inpcbtable *table; - struct in6_addr *laddr; - u_int lport_arg; - int reverse; +in6_pcblookup_listen(struct inpcbtable *table, struct in6_addr *laddr, + u_int lport_arg, int reverse, struct mbuf *m) { struct inpcbhead *head; struct in6_addr *key1, *key2; struct inpcb *inp; u_int16_t lport = lport_arg; +#if NPF + if (m && m->m_pkthdr.pf.flags & PF_TAG_DIVERTED) { + struct pf_divert *divert; + + if ((divert = pf_find_divert(m)) == NULL) + return (NULL); + key1 = key2 = &divert->addr.ipv6; + lport = divert->port; + } else +#endif if (reverse) { key1 = &zeroin6_addr; key2 = laddr; diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index df3e7d46476..cebbdba4172 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -1,4 +1,4 @@ -/* $OpenBSD: in_pcb.h,v 1.61 2008/05/09 02:56:36 markus Exp $ */ +/* $OpenBSD: in_pcb.h,v 1.62 2008/05/15 19:40:38 markus Exp $ */ /* $NetBSD: in_pcb.h,v 1.14 1996/02/13 23:42:00 christos Exp $ */ /* @@ -256,7 +256,7 @@ struct inpcb * u_int, struct in6_addr *, u_int); struct inpcb * in6_pcblookup_listen(struct inpcbtable *, - struct in6_addr *, u_int, int); + struct in6_addr *, u_int, int, struct mbuf *); int in6_pcbbind(struct inpcb *, struct mbuf *); int in6_pcbconnect(struct inpcb *, struct mbuf *); int in6_setsockaddr(struct inpcb *, struct mbuf *); diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index ab26e50f401..28a0d9cbef1 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_input.c,v 1.214 2008/05/09 02:44:54 markus Exp $ */ +/* $OpenBSD: tcp_input.c,v 1.215 2008/05/15 19:40:38 markus Exp $ */ /* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */ /* @@ -615,7 +615,7 @@ findpcb: #ifdef INET6 case AF_INET6: inp = in6_pcblookup_listen(&tcbtable, - &ip6->ip6_dst, th->th_dport, inpl_flags); + &ip6->ip6_dst, th->th_dport, inpl_flags, m); break; #endif /* INET6 */ case AF_INET: diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 165bcdbecb3..9752c57b043 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_usrreq.c,v 1.96 2008/05/09 02:44:54 markus Exp $ */ +/* $OpenBSD: tcp_usrreq.c,v 1.97 2008/05/15 19:40:38 markus Exp $ */ /* $NetBSD: tcp_usrreq.c,v 1.20 1996/02/13 23:44:16 christos Exp $ */ /* @@ -862,7 +862,7 @@ tcp_ident(oldp, oldlenp, newp, newlen, dodrop) #ifdef INET6 case AF_INET6: inp = in6_pcblookup_listen(&tcbtable, - &l6, lin6->sin6_port, 0); + &l6, lin6->sin6_port, 0, NULL); break; #endif case AF_INET: diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index d1abd1f15f3..1bcd75bbe20 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udp_usrreq.c,v 1.118 2008/05/09 02:56:36 markus Exp $ */ +/* $OpenBSD: udp_usrreq.c,v 1.119 2008/05/15 19:40:38 markus Exp $ */ /* $NetBSD: udp_usrreq.c,v 1.28 1996/03/16 23:54:03 christos Exp $ */ /* @@ -545,7 +545,7 @@ udp_input(struct mbuf *m, ...) #ifdef INET6 if (ip6) { inp = in6_pcblookup_listen(&udbtable, - &ip6->ip6_dst, uh->uh_dport, inpl_reverse); + &ip6->ip6_dst, uh->uh_dport, inpl_reverse, m); } else #endif /* INET6 */ inp = in_pcblookup_listen(&udbtable, |