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
..
2006-03-15 19:32:43 +00:00
2005-02-13 22:25:33 +00:00
2006-09-18 11:55:10 +00:00
2006-09-18 11:55:10 +00:00
2006-04-14 09:20:25 +00:00
2005-01-18 10:09:38 +00:00
2006-09-18 11:55:10 +00:00
2006-09-18 11:55:10 +00:00
2006-06-11 15:53:36 +00:00
2006-09-18 11:55:10 +00:00
2004-07-28 05:59:22 +00:00
2006-09-18 11:55:10 +00:00
2006-09-18 11:55:10 +00:00
2006-09-18 11:55:10 +00:00
2006-07-17 20:48:36 +00:00
2005-04-14 20:27:30 +00:00
2006-09-10 08:58:47 +00:00
2006-09-18 11:55:10 +00:00
2005-11-18 10:36:29 +00:00
2005-11-18 10:36:29 +00:00
2006-02-12 07:57:27 +00:00
2006-09-18 11:55:10 +00:00
2006-09-18 11:55:10 +00:00
2006-06-01 02:25:00 +00:00
2006-04-19 19:21:42 +00:00
2005-11-13 01:47:04 +00:00
2005-05-02 10:13:38 +00:00
2005-02-13 22:25:33 +00:00
2005-02-13 22:25:33 +00:00
2006-04-13 12:49:24 +00:00
2004-10-24 14:25:53 +00:00
2006-08-22 08:03:01 +00:00
2006-08-25 09:14:23 +00:00
2006-07-27 13:26:29 +00:00
2006-09-18 11:55:10 +00:00
2005-02-13 23:45:54 +00:00
2005-02-13 22:25:33 +00:00