diff options
author | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2003-12-08 10:05:32 +0000 |
---|---|---|
committer | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2003-12-08 10:05:32 +0000 |
commit | c0bea97b5c77237ce04693a429759169846180bd (patch) | |
tree | b696267e99de9df0a772234d2924f8389f46932f /sys | |
parent | 198d38fc405f391c1b7c4938e7f8ec2f4f25a81d (diff) |
move pf_test6() call below loopback (and mapped-ipv4) tests, so rdr -> ::1
works without additional route-to lo0, just like for ipv4.
ok itojun@, henning@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet6/ip6_input.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index 935828723e1..d516f01ed18 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_input.c,v 1.55 2003/10/14 08:22:31 itojun Exp $ */ +/* $OpenBSD: ip6_input.c,v 1.56 2003/12/08 10:05:31 dhartmei Exp $ */ /* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */ /* @@ -245,20 +245,6 @@ ip6_input(m) goto bad; } -#if NPF > 0 - /* - * Packet filter - */ - odst = ip6->ip6_dst; - if (pf_test6(PF_IN, m->m_pkthdr.rcvif, &m) != PF_PASS) - goto bad; - if (m == NULL) - return; - - ip6 = mtod(m, struct ip6_hdr *); - srcrt = !IN6_ARE_ADDR_EQUAL(&odst, &ip6->ip6_dst); -#endif - ip6stat.ip6s_nxthist[ip6->ip6_nxt]++; /* @@ -334,6 +320,20 @@ ip6_input(m) } } +#if NPF > 0 + /* + * Packet filter + */ + odst = ip6->ip6_dst; + if (pf_test6(PF_IN, m->m_pkthdr.rcvif, &m) != PF_PASS) + goto bad; + if (m == NULL) + return; + + ip6 = mtod(m, struct ip6_hdr *); + srcrt = !IN6_ARE_ADDR_EQUAL(&odst, &ip6->ip6_dst); +#endif + if (IN6_IS_SCOPE_LINKLOCAL(&ip6->ip6_src)) ip6->ip6_src.s6_addr16[1] = htons(m->m_pkthdr.rcvif->if_index); |