mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-31 06:15:55 +00:00
Send client identifier when declining.
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user