summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreyk <reyk@openbsd.org>2006-01-31 10:55:02 +0000
committerreyk <reyk@openbsd.org>2006-01-31 10:55:02 +0000
commit8018a2763f5ce6f939c5ca48e67d36a71854f2b9 (patch)
tree8b4160e085b771c739bd98ecb935732bc5b3b506
parentAnnotate _assert()/__assert2() as __dead. (diff)
downloadwireguard-openbsd-8018a2763f5ce6f939c5ca48e67d36a71854f2b9.tar.xz
wireguard-openbsd-8018a2763f5ce6f939c5ca48e67d36a71854f2b9.zip
fix a bug by updating the bpf packet header for each received frame in
the capture buffer. to alex 'pukpuk' at gmx.de
-rw-r--r--usr.sbin/hostapd/apme.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/hostapd/apme.c b/usr.sbin/hostapd/apme.c
index 016dc9198f2..b5ff5e6ead4 100644
--- a/usr.sbin/hostapd/apme.c
+++ b/usr.sbin/hostapd/apme.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apme.c,v 1.10 2005/12/18 17:54:12 reyk Exp $ */
+/* $OpenBSD: apme.c,v 1.11 2006/01/31 10:55:02 reyk Exp $ */
/*
* Copyright (c) 2004, 2005 Reyk Floeter <reyk@openbsd.org>
@@ -155,11 +155,12 @@ hostapd_apme_input(int fd, short sig, void *arg)
*/
bp = (u_int8_t *)&buf;
- bph = (struct bpf_hdr *)bp;
ep = bp + len;
while (bp < ep) {
register u_int caplen, hdrlen;
+
+ bph = (struct bpf_hdr *)bp;
caplen = bph->bh_caplen;
hdrlen = bph->bh_hdrlen;