From: Ted Lemon Date: Tue, 6 Jul 1999 17:09:03 +0000 (+0000) Subject: Use limited_broadcast global instead of INADDR_BROADCAST. X-Git-Tag: V3-BETA-1-PATCH-0~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71df44f55a794400358687a591119086820a8ae8;p=thirdparty%2Fdhcp.git Use limited_broadcast global instead of INADDR_BROADCAST. --- diff --git a/server/bootp.c b/server/bootp.c index 5bb62968f..a0b630e5b 100644 --- a/server/bootp.c +++ b/server/bootp.c @@ -22,7 +22,7 @@ #ifndef lint static char copyright[] = -"$Id: bootp.c,v 1.50 1999/07/02 20:58:48 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; +"$Id: bootp.c,v 1.51 1999/07/06 17:07:12 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -306,7 +306,7 @@ void bootp (packet) } /* Otherwise, broadcast it on the local network. */ } else { - to.sin_addr.s_addr = INADDR_BROADCAST; + to.sin_addr = limited_broadcast; to.sin_port = remote_port; /* XXX */ } diff --git a/server/dhcp.c b/server/dhcp.c index f0a0bb293..4108c8d11 100644 --- a/server/dhcp.c +++ b/server/dhcp.c @@ -22,7 +22,7 @@ #ifndef lint static char copyright[] = -"$Id: dhcp.c,v 1.98 1999/07/02 20:58:48 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; +"$Id: dhcp.c,v 1.99 1999/07/06 17:09:03 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -626,7 +626,7 @@ void dhcpinform (packet) #endif memset (to.sin_zero, 0, sizeof to.sin_zero); - /* Use the IP address we intuited for the client. */ + /* Use the IP address we derived for the client. */ memcpy (&to.sin_addr, cip.iabuf, 4); to.sin_port = remote_port; @@ -767,7 +767,7 @@ void nak_lease (packet, cip) return; } } else { - to.sin_addr.s_addr = htonl (INADDR_BROADCAST); + to.sin_addr = limited_broadcast; to.sin_port = remote_port; } @@ -1821,7 +1821,7 @@ void dhcp_reply (lease) /* Otherwise, broadcast it on the local network. */ } else { - to.sin_addr.s_addr = htonl (INADDR_BROADCAST); + to.sin_addr = limited_broadcast; to.sin_port = remote_port; }