Can dhcpclient handle broadcasting ?
Chaigneau, Nicolas
nicolas.chaigneau at capgemini.com
Wed Jul 9 10:38:56 CEST 2014
OK, the answer is no. It fails because:
"If the socket protocol supports broadcast and the specified address is a broadcast address for the socket protocol, sendmsg() will fail if the SO_BROADCAST option is not set for the socket."
The socket set up by dhcpclient.c needs something like this :
int so_broadcast = 1;
status = setsockopt(sockfd,
SOL_SOCKET, SO_BROADCAST,
&so_broadcast, sizeof so_broadcast);
De : freeradius-users-bounces+nicolas.chaigneau=capgemini.com at lists.freeradius.org [mailto:freeradius-users-bounces+nicolas.chaigneau=capgemini.com at lists.freeradius.org] De la part de Chaigneau, Nicolas
Envoyé : mercredi 9 juillet 2014 09:54
À : freeradius-users at lists.freeradius.org
Objet : Can dhcpclient handle broadcasting ?
Hello,
I'm trying to use dhcpclient to test broadcasting of a DHCP Discover.
I am root so I can use source port 68.
I'm sending the packet to the broadcast address.
I get the following error (returned by sendmsg, called from "sendfromto"): "Permission denied".
Is it possible to use dhcpclient from FreeRADIUS in broadcast mode ?
Regards,
Nicolas.
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20140709/7e5a5f29/attachment.html>
More information about the Freeradius-Users
mailing list