summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2007-06-09 16:32:00 +0000
committerhenning <henning@openbsd.org>2007-06-09 16:32:00 +0000
commit0e6f7b5b7e8c55404feb23a81eab21efc9783a83 (patch)
treec1b0b7aa43e07794217156c832bccaf4695f7be1
parentSilence a debug printf. (diff)
downloadwireguard-openbsd-0e6f7b5b7e8c55404feb23a81eab21efc9783a83.tar.xz
wireguard-openbsd-0e6f7b5b7e8c55404feb23a81eab21efc9783a83.zip
sizeof(ptr) is no good if you want sizeof(*ptr). icmp/icmpv6.
-rw-r--r--sys/net/pf.c6
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;