Can dhcpclient handle broadcasting ?

Chaigneau, Nicolas nicolas.chaigneau at
Thu Jul 17 10:51:30 CEST 2014

Additionally, I've noticed that :
- 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 (even with "Packet-Src-IP-Address=").
An actual IP address is automatically used as source.
>From what I understand, this is modified by the device driver.

I've first tried to force the interface with setsockopt and option "SO_BINDTODEVICE", but this apparently doesn't do anything useful...

So I've done 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.)

Maybe there's a better way to do this... I couldn't find one, though.


-----Message d'origine-----
De : at [ at] De la part de Alan DeKok
Envoyé : mercredi 9 juillet 2014 21:37
À : FreeRadius users mailing list
Objet : Re: Can dhcpclient handle broadcasting ?

Chaigneau, Nicolas wrote:
> The socket set up by dhcpclient.c needs something like this :

  Yes.  It should probably do that automatically if dhcpclient.c detects that the destination address isn't a unicast one.

  Alan DeKok.
List info/subscribe/unsubscribe? See
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.

More information about the Freeradius-Users mailing list