diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2013-06-04 19:03:13 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2013-06-04 19:03:13 +0000 |
commit | baaaf98da60f3ff53a511f3ebf0725e2092010b6 (patch) | |
tree | c2db9d040a82cf947e3bd60531907ea3617eb116 /sys/net/pf.c | |
parent | 020fe6face6b46e12c930196fd3a2adb2bdfbed7 (diff) |
add a pointer to the protocol checksum header field to pf_pdesc and set
it up in pf_setup_pdesc(). ok ryan benno mikeb bluhm
Diffstat (limited to 'sys/net/pf.c')
-rw-r--r-- | sys/net/pf.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c index dce0faeee34..c2c690dc674 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.831 2013/06/04 18:58:28 henning Exp $ */ +/* $OpenBSD: pf.c,v 1.832 2013/06/04 19:03:11 henning Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -6565,6 +6565,7 @@ pf_setup_pdesc(struct pf_pdesc *pd, void *pdhdrs, sa_family_t af, int dir, pd->p_len = pd->tot_len - pd->off - (th->th_off << 2); pd->sport = &th->th_sport; pd->dport = &th->th_dport; + pd->pcksum = &th->th_sum; break; } case IPPROTO_UDP: { @@ -6582,6 +6583,7 @@ pf_setup_pdesc(struct pf_pdesc *pd, void *pdhdrs, sa_family_t af, int dir, } pd->sport = &uh->uh_sport; pd->dport = &uh->uh_dport; + pd->pcksum = &uh->uh_sum; break; } case IPPROTO_ICMP: { @@ -6593,6 +6595,7 @@ pf_setup_pdesc(struct pf_pdesc *pd, void *pdhdrs, sa_family_t af, int dir, REASON_SET(reason, PFRES_SHORT); return (PF_DROP); } + pd->pcksum = &pd->hdr.icmp->icmp_cksum; break; } #ifdef INET6 |