diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2007-06-09 16:32:01 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2007-06-09 16:32:01 +0000 |
commit | 5d476cd4253401275dee9e56b3841c439b7fdce6 (patch) | |
tree | b5fb790c6733738043cd148c0e605933ece8f55b /sys/net/pf.c | |
parent | 736f845e0c5e0d667d27a54ff532dcced447e360 (diff) |
sizeof(ptr) is no good if you want sizeof(*ptr). icmp/icmpv6.
Diffstat (limited to 'sys/net/pf.c')
-rw-r--r-- | sys/net/pf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c index 1e466b106f9..3d435310f46 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.541 2007/06/02 01:28:55 henning Exp $ */ +/* $OpenBSD: pf.c,v 1.542 2007/06/09 16:32:00 henning Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -2846,7 +2846,7 @@ pf_test_rule(struct pf_rule **rm, struct pf_state **sm, int direction, #ifdef INET case IPPROTO_ICMP: sport = dport = pd->hdr.icmp->icmp_id; - hdrlen = sizeof(pd->hdr.icmp); + hdrlen = sizeof(*pd->hdr.icmp); icmptype = pd->hdr.icmp->icmp_type; icmpcode = pd->hdr.icmp->icmp_code; @@ -2861,7 +2861,7 @@ pf_test_rule(struct pf_rule **rm, struct pf_state **sm, int direction, #ifdef INET6 case IPPROTO_ICMPV6: sport = dport = pd->hdr.icmp6->icmp6_id; - hdrlen = sizeof(pd->hdr.icmp6); + hdrlen = sizeof(*pd->hdr.icmp6); icmptype = pd->hdr.icmp6->icmp6_type; icmpcode = pd->hdr.icmp6->icmp6_code; |