freebsd-nq/sbin/dhclient
Brooks Davis ebe609b4a2 It is possible for bpf to return a length such that:
length != BPF_WORDALIGN(length)

This meeans that it is possible for this to be true:

	interface->rbuf_offset > interface->rbuf_len

Handle this case in the test for running out of packets.  While
OpenBSD's solution of setting interface->rbuf_len to
BPF_WORDALIGN(length) is safe due to the size of the buffer, I think
this solution results in less hidden assumptions.

This should fix the problem of dhclient running away and consuming 100%
CPU.

PR:		bin/102226
Submitted by:	Joost Bekkers <joost at jodocus.org>
MFC after:	3 days
2006-09-26 01:02:02 +00:00
..
alloc.c Add __FBSDID to all .c files in dhclient to aid in determining file 2005-08-23 23:59:55 +00:00
bpf.c It is possible for bpf to return a length such that: 2006-09-26 01:02:02 +00:00
clparse.c Add __FBSDID to all .c files in dhclient to aid in determining file 2005-08-23 23:59:55 +00:00
conflex.c In read_string(), when the last character was a backslash, unincrement 2005-08-26 01:25:59 +00:00
convert.c Add __FBSDID to all .c files in dhclient to aid in determining file 2005-08-23 23:59:55 +00:00
dhclient-script Fix rev 1.12. 2006-01-26 21:05:39 +00:00
dhclient-script.8 Line up the markup. 2005-06-22 14:55:59 +00:00
dhclient.8 Revert the addition of -p. It's flawed in that dhclient should not run 2006-08-21 16:31:31 +00:00
dhclient.c Revert the addition of -p. It's flawed in that dhclient should not run 2006-08-21 16:31:31 +00:00
dhclient.conf Import the OpenBSD dhclient as shipped with OpenBSD-3.7 (the tag 2005-06-07 04:05:09 +00:00
dhclient.conf.5 Line up the markup. 2005-06-22 14:55:59 +00:00
dhclient.leases.5 Line up the markup. 2005-06-22 14:55:59 +00:00
dhcp-options.5 Correct RFC for NTP. 2006-02-06 19:22:34 +00:00
dhcp.h Don't complain when we receive smtp, pop, nntp, www, finger, and irc 2005-06-30 05:50:52 +00:00
dhcpd.h Import the OpenBSD dhclient as shipped with OpenBSD-3.7 (the tag 2005-06-07 04:05:09 +00:00
dhctoken.h Import the OpenBSD dhclient as shipped with OpenBSD-3.7 (the tag 2005-06-07 04:05:09 +00:00
dispatch.c Add __FBSDID to all .c files in dhclient to aid in determining file 2005-08-23 23:59:55 +00:00
errwarn.c Add __FBSDID to all .c files in dhclient to aid in determining file 2005-08-23 23:59:55 +00:00
hash.c Add __FBSDID to all .c files in dhclient to aid in determining file 2005-08-23 23:59:55 +00:00
inet.c Add __FBSDID to all .c files in dhclient to aid in determining file 2005-08-23 23:59:55 +00:00
Makefile Install the dhcp-options.5 manpage. 2005-06-25 11:03:06 +00:00
options.c Add __FBSDID to all .c files in dhclient to aid in determining file 2005-08-23 23:59:55 +00:00
packet.c Add __FBSDID to all .c files in dhclient to aid in determining file 2005-08-23 23:59:55 +00:00
parse.c Add __FBSDID to all .c files in dhclient to aid in determining file 2005-08-23 23:59:55 +00:00
privsep.c Add __FBSDID to all .c files in dhclient to aid in determining file 2005-08-23 23:59:55 +00:00
privsep.h Import the OpenBSD dhclient as shipped with OpenBSD-3.7 (the tag 2005-06-07 04:05:09 +00:00
tables.c Add __FBSDID to all .c files in dhclient to aid in determining file 2005-08-23 23:59:55 +00:00
tree.c Add __FBSDID to all .c files in dhclient to aid in determining file 2005-08-23 23:59:55 +00:00
tree.h Import the OpenBSD dhclient as shipped with OpenBSD-3.7 (the tag 2005-06-07 04:05:09 +00:00