summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/ip6_input.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2003-10-16 19:55:28 +0000
committersam <sam@FreeBSD.org>2003-10-16 19:55:28 +0000
commit81a0698b6a7042c46d3d15bc3fb57c67dca3c0e8 (patch)
treefb1c9945c07afaa066166f1bde64388b77306fba /sys/netinet6/ip6_input.c
parent104396b82e345d5a0940c3e056b20484c180e6fa (diff)
downloadFreeBSD-src-81a0698b6a7042c46d3d15bc3fb57c67dca3c0e8.zip
FreeBSD-src-81a0698b6a7042c46d3d15bc3fb57c67dca3c0e8.tar.gz
fix horribly botched MFp4 merge
Diffstat (limited to 'sys/netinet6/ip6_input.c')
-rw-r--r--sys/netinet6/ip6_input.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c
index 3f2c9cb..01bd0ca 100644
--- a/sys/netinet6/ip6_input.c
+++ b/sys/netinet6/ip6_input.c
@@ -246,11 +246,11 @@ ip6_input(m)
u_int32_t rtalert = ~0;
int nxt, ours = 0;
struct ifnet *deliverifp = NULL;
-
#ifdef PFIL_HOOKS
struct in6_addr odst;
#endif
int srcrt = 0;
+
#ifdef IPSEC
/*
* should the inner packet be considered authentic?
@@ -345,17 +345,18 @@ ip6_input(m)
#ifdef PFIL_HOOKS
/*
* Run through list of hooks for input packets.
+ *
+ * NB: Beware of the destination address changing
+ * (e.g. by NAT rewriting). When this happens,
+ * tell ip6_forward to do the right thing.
*/
+ odst = ip6->ip6_dst;
if (pfil_run_hooks(&inet6_pfil_hook, &m, m->m_pkthdr.rcvif, PFIL_IN))
return;
if (m == NULL) /* consumed by filter */
return;
- *
- * NB: Beware of the destination address changing
- * (e.g. by NAT rewriting). When this happens,
- * tell ip6_forward to do the right thing.
ip6 = mtod(m, struct ip6_hdr *);
- odst = ip6->ip6_dst;
+ srcrt = !IN6_ARE_ADDR_EQUAL(&odst, &ip6->ip6_dst);
#endif /* PFIL_HOOKS */
ip6stat.ip6s_nxthist[ip6->ip6_nxt]++;
@@ -365,7 +366,6 @@ ip6_input(m)
*/
if (ip6_fw_enable && ip6_fw_chk_ptr) {
u_short port = 0;
- srcrt = !IN6_ARE_ADDR_EQUAL(&odst, &ip6->ip6_dst);
/* If ipfw says divert, we have to just drop packet */
/* use port as a dummy argument */
if ((*ip6_fw_chk_ptr)(&ip6, NULL, &port, &m)) {
OpenPOWER on IntegriCloud