aboutsummaryrefslogtreecommitdiff
path: root/sbin/dhclient
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2005-07-27 19:25:46 +0000
committerBrooks Davis <brooks@FreeBSD.org>2005-07-27 19:25:46 +0000
commit4eae015de1406e884e1e8c084089a483fea2240c (patch)
treed3d41ba7b7b604cd5c8e861a68ff6b907a8411b4 /sbin/dhclient
parentfd95fd457fbab9ca85806de8004953e97ddde63b (diff)
Notes
Diffstat (limited to 'sbin/dhclient')
-rw-r--r--sbin/dhclient/bpf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/dhclient/bpf.c b/sbin/dhclient/bpf.c
index 7482c95a0f74..abda36e61e64 100644
--- a/sbin/dhclient/bpf.c
+++ b/sbin/dhclient/bpf.c
@@ -316,19 +316,19 @@ receive_packet(struct interface_info *interface, unsigned char *buf,
continue;
}
+ /* Skip over the BPF header... */
+ interface->rbuf_offset += hdr.bh_hdrlen;
+
/*
* If the captured data wasn't the whole packet, or if
* the packet won't fit in the input buffer, all we can
* do is drop it.
*/
if (hdr.bh_caplen != hdr.bh_datalen) {
- interface->rbuf_offset += hdr.bh_hdrlen = hdr.bh_caplen;
+ interface->rbuf_offset += hdr.bh_caplen;
continue;
}
- /* Skip over the BPF header... */
- interface->rbuf_offset += hdr.bh_hdrlen;
-
/* Decode the physical header... */
offset = decode_hw_header(interface->rbuf,
interface->rbuf_offset, hfrom);