Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netpfil/pf/pf.c
Show First 20 Lines • Show All 6,345 Lines • ▼ Show 20 Lines | pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb *inp) | ||||
/* We do IP header normalization and packet reassembly here */ | /* We do IP header normalization and packet reassembly here */ | ||||
if (pf_normalize_ip6(m0, dir, kif, &reason, &pd) != PF_PASS) { | if (pf_normalize_ip6(m0, dir, kif, &reason, &pd) != PF_PASS) { | ||||
action = PF_DROP; | action = PF_DROP; | ||||
goto done; | goto done; | ||||
} | } | ||||
m = *m0; /* pf_normalize messes with m0 */ | m = *m0; /* pf_normalize messes with m0 */ | ||||
h = mtod(m, struct ip6_hdr *); | h = mtod(m, struct ip6_hdr *); | ||||
#if 1 | |||||
/* | /* | ||||
* we do not support jumbogram yet. if we keep going, zero ip6_plen | * we do not support jumbogram. if we keep going, zero ip6_plen | ||||
* will do something bad, so drop the packet for now. | * will do something bad, so drop the packet for now. | ||||
*/ | */ | ||||
if (htons(h->ip6_plen) == 0) { | if (htons(h->ip6_plen) == 0) { | ||||
action = PF_DROP; | action = PF_DROP; | ||||
REASON_SET(&reason, PFRES_NORM); /*XXX*/ | REASON_SET(&reason, PFRES_NORM); /*XXX*/ | ||||
goto done; | goto done; | ||||
} | } | ||||
#endif | |||||
pd.src = (struct pf_addr *)&h->ip6_src; | pd.src = (struct pf_addr *)&h->ip6_src; | ||||
pd.dst = (struct pf_addr *)&h->ip6_dst; | pd.dst = (struct pf_addr *)&h->ip6_dst; | ||||
pd.sport = pd.dport = NULL; | pd.sport = pd.dport = NULL; | ||||
pd.ip_sum = NULL; | pd.ip_sum = NULL; | ||||
pd.proto_sum = NULL; | pd.proto_sum = NULL; | ||||
pd.dir = dir; | pd.dir = dir; | ||||
pd.sidx = (dir == PF_IN) ? 0 : 1; | pd.sidx = (dir == PF_IN) ? 0 : 1; | ||||
▲ Show 20 Lines • Show All 334 Lines • Show Last 20 Lines |