fix horribly botched MFp4 merge

This commit is contained in:
Sam Leffler 2003-10-16 19:55:28 +00:00
parent 3c92002f24
commit e312432731

View File

@ -246,11 +246,11 @@ ip6_input(m)
u_int32_t rtalert = ~0; u_int32_t rtalert = ~0;
int nxt, ours = 0; int nxt, ours = 0;
struct ifnet *deliverifp = NULL; struct ifnet *deliverifp = NULL;
#ifdef PFIL_HOOKS #ifdef PFIL_HOOKS
struct in6_addr odst; struct in6_addr odst;
#endif #endif
int srcrt = 0; int srcrt = 0;
#ifdef IPSEC #ifdef IPSEC
/* /*
* should the inner packet be considered authentic? * should the inner packet be considered authentic?
@ -345,17 +345,18 @@ ip6_input(m)
#ifdef PFIL_HOOKS #ifdef PFIL_HOOKS
/* /*
* Run through list of hooks for input packets. * Run through list of hooks for input packets.
*/
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 * NB: Beware of the destination address changing
* (e.g. by NAT rewriting). When this happens, * (e.g. by NAT rewriting). When this happens,
* tell ip6_forward to do the right thing. * tell ip6_forward to do the right thing.
ip6 = mtod(m, struct ip6_hdr *); */
odst = ip6->ip6_dst; 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;
ip6 = mtod(m, struct ip6_hdr *);
srcrt = !IN6_ARE_ADDR_EQUAL(&odst, &ip6->ip6_dst);
#endif /* PFIL_HOOKS */ #endif /* PFIL_HOOKS */
ip6stat.ip6s_nxthist[ip6->ip6_nxt]++; ip6stat.ip6s_nxthist[ip6->ip6_nxt]++;
@ -365,7 +366,6 @@ ip6_input(m)
*/ */
if (ip6_fw_enable && ip6_fw_chk_ptr) { if (ip6_fw_enable && ip6_fw_chk_ptr) {
u_short port = 0; u_short port = 0;
srcrt = !IN6_ARE_ADDR_EQUAL(&odst, &ip6->ip6_dst);
/* If ipfw says divert, we have to just drop packet */ /* If ipfw says divert, we have to just drop packet */
/* use port as a dummy argument */ /* use port as a dummy argument */
if ((*ip6_fw_chk_ptr)(&ip6, NULL, &port, &m)) { if ((*ip6_fw_chk_ptr)(&ip6, NULL, &port, &m)) {