FreeRADIUS/freeradius-server — pull request #741 by nchaigne (2014-07-22 15:39:01+00:00)
Title: dhcpclient - allow to specify interface and send/recv at raw packet level

As discussed earlier on the list:
- if the client host has multiple interfaces,
- and at least one of them already has an IP address, Then the source IP
address cannot be 0.0.0.0 (even with "Packet-Src-IP-Address=0.0.0.0").
An actual IP address is automatically used as source.
This is modified by the device driver.

This patch does the following:
- Add an option to dhcpclient allowing to specify which network
interface to use.
- Open a raw socket on the low level packet interface. This allows
packet data to be left unchanged by the device driver.
- Encode Ethernet (send to ff:ff:ff:ff:ff:ff), IP and UDP layers
manually. And let FreeRADIUS do the DHCP stuff, as before.

(This required new specific socket / send / recv functions.)

The existing behaviour of dhcpclient is unchanged, it is used if the new
option -i is not set (or if destination is not broadcast).