From: Ted Lemon Date: Thu, 6 Mar 1997 20:13:42 +0000 (+0000) Subject: Send client identifier when declining. X-Git-Tag: DHCP-970328~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ca25f4ab5e986007420a07d716b0b5c1a4a76c5e;p=thirdparty%2Fdhcp.git Send client identifier when declining. --- diff --git a/client/dhclient.c b/client/dhclient.c index 0d1e4be47..163b4d041 100644 --- a/client/dhclient.c +++ b/client/dhclient.c @@ -56,7 +56,7 @@ #ifndef lint static char copyright[] = -"$Id: dhclient.c,v 1.32 1997/03/06 20:00:51 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; +"$Id: dhclient.c,v 1.33 1997/03/06 20:13:42 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -1385,6 +1385,7 @@ void make_decline (ip, lease) struct tree_cache message_type_tree; struct tree_cache requested_address_tree; struct tree_cache server_id_tree; + struct tree_cache client_id_tree; memset (options, 0, sizeof options); memset (&ip -> client -> packet, 0, sizeof (ip -> client -> packet)); @@ -1416,6 +1417,21 @@ void make_decline (ip, lease) options [i] -> timeout = 0xFFFFFFFF; options [i] -> tree = (struct tree *)0; + /* Send the uid if the user supplied one. */ + i = DHO_DHCP_CLIENT_IDENTIFIER; + if (ip -> client -> config -> send_options [i].len) { + options [i] = &client_id_tree; + options [i] -> value = ip -> client -> config -> + send_options [i].data; + options [i] -> len = ip -> client -> config -> + send_options [i].len; + options [i] -> buf_size = ip -> client -> config -> + send_options [i].len; + options [i] -> timeout = 0xFFFFFFFF; + options [i] -> tree = (struct tree *)0; + } + + /* Set up the option buffer... */ ip -> client -> packet_length = cons_options ((struct packet *)0, &ip -> client -> packet,