summaryrefslogtreecommitdiffstats
path: root/sbin/dhclient/bpf.c
Commit message (Collapse)AuthorAgeFilesLines
* Make dhclient use bootpc (68) as the source port for unicast DHCPREQUESTphilip2009-10-211-18/+27
| | | | | | | | | | | | packets instead of allowing the protocol stack to pick a random source port. This fixes the behaviour where dhclient would never transition from RENEWING to BOUND without going through REBINDING in networks which are paranoid about DHCP spoofing, such as most mainstream cable-broadband ISP networks. Reviewed by: brooks Obtained from: OpenBSD (partly - I'm not convinced their solution can work) MFC after: 1 week (pending re approval)
* When sending packets directly to the DHCP server, use a socket and sendbrooks2008-04-151-0/+15
| | | | | | | | directly rather than bogusly sending it out as a link layer broadcast (which fails to be received on some networks). PR: bin/96018 MFC after: 2 weeks
* It is possible for bpf to return a length such that:brooks2006-09-261-1/+1
| | | | | | | | | | | | | | | | | | | | 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
* Add __FBSDID to all .c files in dhclient to aid in determining filebrooks2005-08-231-1/+3
| | | | versions when dealing with user problems.
* FreeBSD unconditionally supports write filters now.csjp2005-08-231-2/+0
|
* Further fix receive_packet() by using BPF_WORDALIGN to insure the offsetbrooks2005-07-281-5/+15
| | | | | | is properly aligned when we move to the next packet. Obtained from: ISC dhclient via krw at OpenBSD
* Fix a bug in the handling of cases where we got a short (or zero)brooks2005-07-271-4/+4
| | | | | | | | capture. Zero length captures caused an infinte loop and short captures probably caused memory corruption and a crash. Reported by: many MFC After: 3 days
* We don't support BPF write filters at this time.brooks2005-06-071-0/+3
| | | | Submitted by: sam
* Import the OpenBSD dhclient as shipped with OpenBSD-3.7 (the tagbrooks2005-06-071-0/+374
OPENBSD_3_7).
OpenPOWER on IntegriCloud