mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-31 06:15:55 +00:00
- DHCPD is now RFC2131 section 4.1 compliant (broadcast to all-ones ip and
ethernet mac address) on the SCO platform specifically without any strange ifconfig hacks. Many thanks go to the Kroger Co. for donating the hardware and funding the development. [V3-0-1-KROGER-WORK-BRANCH] - funded development.
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: socket.c,v 1.58 2005/03/17 20:15:00 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
||||
"$Id: socket.c,v 1.59 2006/07/25 17:41:18 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
@@ -149,6 +149,20 @@ int if_register_socket (info)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* IP_BROADCAST_IF instructs the kernel which interface to send
|
||||
* IP packets whose destination address is 255.255.255.255. These
|
||||
* will be treated as subnet broadcasts on the interface identified
|
||||
* by ip address (info -> primary_address). This is only known to
|
||||
* be defined in SCO system headers, and may not be defined in all
|
||||
* releases.
|
||||
*/
|
||||
#if defined(SCO) && defined(IP_BROADCAST_IF)
|
||||
if (setsockopt (sock, IPPROTO_IP, IP_BROADCAST_IF,
|
||||
&info -> primary_address,
|
||||
sizeof (info -> primary_address)) < 0)
|
||||
log_fatal ("Can't set IP_BROADCAST_IF on dhcp socket: %m");
|
||||
#endif
|
||||
|
||||
return sock;
|
||||
}
|
||||
#endif /* USE_SOCKET_SEND || USE_SOCKET_RECEIVE || USE_SOCKET_FALLBACK */
|
||||
|
Reference in New Issue
Block a user