summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2016-12-06 00:01:56 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2016-12-06 00:01:56 +0000
commita8de27d08bc17a15bb8e6dd767c9bbdb05c7f9c8 (patch)
tree8b13e838adb71ed4686155b9ace63858a320cf22 /sys/net
parent83d4e290f609f9aede852d846d9513db03a08191 (diff)
Use the sizeof udphdr not the sizeof a pointer to it in the af-to
specific part of pf_test_state_icmp(). This worked by accident on LP64 archs as the struct is eight bytes long. ok mikeb@ bluhm@ krw@ jca@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/pf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c
index 4e83761b8fd..213341e45f9 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.1003 2016/11/28 23:15:30 bluhm Exp $ */
+/* $OpenBSD: pf.c,v 1.1004 2016/12/06 00:01:55 jsg Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -5257,7 +5257,7 @@ pf_test_state_icmp(struct pf_pdesc *pd, struct pf_state **state,
pf_patch_16(pd,
&uh->uh_dport, nk->port[didx]);
- m_copyback(pd2.m, pd2.off, sizeof(uh),
+ m_copyback(pd2.m, pd2.off, sizeof(*uh),
uh, M_NOWAIT);
return (PF_AFRT);
}