mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-23 02:17:31 +00:00
Use option_state_reference instead of just copying the pointer.
This commit is contained in:
parent
951323fef5
commit
4bf33120c3
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char ocopyright[] =
|
static char ocopyright[] =
|
||||||
"$Id: dhclient.c,v 1.70 1999/04/05 15:19:59 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
|
"$Id: dhclient.c,v 1.71 1999/04/05 19:00:50 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@ -893,8 +893,8 @@ struct client_lease *packet_to_lease (packet)
|
|||||||
memset (lease, 0, sizeof *lease);
|
memset (lease, 0, sizeof *lease);
|
||||||
|
|
||||||
/* Copy the lease options. */
|
/* Copy the lease options. */
|
||||||
lease -> options = packet -> options;
|
option_state_reference (&lease -> options,
|
||||||
memset (&packet -> options, 0, sizeof packet -> options);
|
packet -> options, "packet_to_lease");
|
||||||
|
|
||||||
lease -> address.len = sizeof (packet -> raw -> yiaddr);
|
lease -> address.len = sizeof (packet -> raw -> yiaddr);
|
||||||
memcpy (lease -> address.iabuf, &packet -> raw -> yiaddr,
|
memcpy (lease -> address.iabuf, &packet -> raw -> yiaddr,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user