Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/dhcp Merge patchlevel 21



details:   https://anonhg.NetBSD.org/src/rev/03862d34e168
branches:  trunk
changeset: 467832:03862d34e168
user:      mellon <mellon%NetBSD.org@localhost>
date:      Tue Mar 30 01:53:57 1999 +0000

description:
Merge patchlevel 21

diffstat:

 usr.sbin/dhcp/client/dhclient.c |  23 ++++++++++++++++-------
 usr.sbin/dhcp/server/dhcpd.c    |   4 ++--
 2 files changed, 18 insertions(+), 9 deletions(-)

diffs (87 lines):

diff -r 2a3ef6b534d8 -r 03862d34e168 usr.sbin/dhcp/client/dhclient.c
--- a/usr.sbin/dhcp/client/dhclient.c   Tue Mar 30 01:51:44 1999 +0000
+++ b/usr.sbin/dhcp/client/dhclient.c   Tue Mar 30 01:53:57 1999 +0000
@@ -56,7 +56,7 @@
 
 #ifndef lint
 static char ocopyright[] =
-"$Id: dhclient.c,v 1.18 1999/03/30 00:12:14 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: dhclient.c,v 1.19 1999/03/30 01:53:57 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -95,7 +95,7 @@
 static char copyright[] =
 "Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.";
 static char arr [] = "All rights reserved.";
-static char message [] = "Internet Software Consortium DHCP Client V2.0b1pl20";
+static char message [] = "Internet Software Consortium DHCP Client V2.0b1pl21";
 static char contrib [] = "Please contribute if you find this software useful.";
 static char url [] = "For info, please visit http://www.isc.org/dhcp-contrib.html";;
 
@@ -1480,7 +1480,12 @@
        ip -> client -> packet.hops = 0;
        ip -> client -> packet.xid = random ();
        ip -> client -> packet.secs = 0; /* filled in by send_discover. */
-       ip -> client -> packet.flags = htons (BOOTP_BROADCAST); /* XXX */
+
+       if (can_receive_unicast_unconfigured (ip))
+               ip -> client -> packet.flags = 0;
+       else
+               ip -> client -> packet.flags = htons (BOOTP_BROADCAST);
+
        memset (&(ip -> client -> packet.ciaddr),
                0, sizeof ip -> client -> packet.ciaddr);
        memset (&(ip -> client -> packet.yiaddr),
@@ -1599,7 +1604,10 @@
        } else {
                memset (&ip -> client -> packet.ciaddr, 0,
                        sizeof ip -> client -> packet.ciaddr);
-               ip -> client -> packet.flags = htons (BOOTP_BROADCAST);
+               if (can_receive_unicast_unconfigured (ip))
+                       ip -> client -> packet.flags = 0;
+               else
+                       ip -> client -> packet.flags = htons (BOOTP_BROADCAST);
        }
 
        memset (&ip -> client -> packet.yiaddr, 0,
@@ -1688,7 +1696,7 @@
        ip -> client -> packet.hops = 0;
        ip -> client -> packet.xid = ip -> client -> xid;
        ip -> client -> packet.secs = 0; /* Filled in by send_request. */
-       ip -> client -> packet.flags = htons (BOOTP_BROADCAST);
+       ip -> client -> packet.flags = 0;
 
        /* ciaddr must always be zero. */
        memset (&ip -> client -> packet.ciaddr, 0,
@@ -1754,8 +1762,9 @@
        ip -> client -> packet.xid = random ();
        ip -> client -> packet.secs = 0;
        ip -> client -> packet.flags = 0;
-       memcpy (&ip -> client -> packet.ciaddr,
-               lease -> address.iabuf, lease -> address.len);
+
+       memset (&ip -> client -> packet.ciaddr, 0,
+               sizeof ip -> client -> packet.ciaddr);
        memset (&ip -> client -> packet.yiaddr, 0,
                sizeof ip -> client -> packet.yiaddr);
        memset (&ip -> client -> packet.siaddr, 0,
diff -r 2a3ef6b534d8 -r 03862d34e168 usr.sbin/dhcp/server/dhcpd.c
--- a/usr.sbin/dhcp/server/dhcpd.c      Tue Mar 30 01:51:44 1999 +0000
+++ b/usr.sbin/dhcp/server/dhcpd.c      Tue Mar 30 01:53:57 1999 +0000
@@ -42,13 +42,13 @@
 
 #ifndef lint
 static char ocopyright[] =
-"$Id: dhcpd.c,v 1.9 1999/03/30 00:12:15 mellon Exp $ Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.";
+"$Id: dhcpd.c,v 1.10 1999/03/30 01:53:58 mellon Exp $ Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.";
 #endif
 
 static char copyright[] =
 "Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.";
 static char arr [] = "All rights reserved.";
-static char message [] = "Internet Software Consortium DHCP Server V2.0b1pl20";
+static char message [] = "Internet Software Consortium DHCP Server V2.0b1pl21";
 static char contrib [] = "Please contribute if you find this software useful.";
 static char url [] = "For info, please visit http://www.isc.org/dhcp-contrib.html";;
 



Home | Main Index | Thread Index | Old Index