summaryrefslogtreecommitdiffstats
path: root/src/plugins/dhcp/dhcp_api.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-10-15 15:47:55 +0000
committerNeale Ranns <nranns@cisco.com>2019-10-25 17:56:06 +0000
commit6bcc6a45573f387fa6c1682069da7ee9036cabe2 (patch)
tree2471089b417624c5eeda998db113edeb5b4b5c95 /src/plugins/dhcp/dhcp_api.c
parentd7b306657d205fddd781e982aec5f3c3dc69fa88 (diff)
dhcp: fix crash on unicast renewal send
Type: fix - when the addresses were learnt a copy of the client was sent to the main thread, this meant the unicast adjacecny was saved on the copy not on the original. - Add logging. - Improve the proxy-node that hands the clint packets so the DHCP packets are traced. - allow a renewal to configure new address data Change-Id: I6ab0afcccbc4a1cdefdd1b8beeda8fc7ba20ec1f Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/plugins/dhcp/dhcp_api.c')
-rw-r--r--src/plugins/dhcp/dhcp_api.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/dhcp/dhcp_api.c b/src/plugins/dhcp/dhcp_api.c
index 61efaba09b0..744d8386d44 100644
--- a/src/plugins/dhcp/dhcp_api.c
+++ b/src/plugins/dhcp/dhcp_api.c
@@ -269,10 +269,12 @@ dhcp_client_lease_encode (vl_api_dhcp_lease_t * lease,
clib_memcpy (&lease->hostname, client->hostname, len);
lease->hostname[len] = 0;
- lease->mask_width = client->subnet_mask_width;
- clib_memcpy (&lease->host_address.un, (u8 *) & client->leased_address,
+ lease->mask_width = client->installed.subnet_mask_width;
+ clib_memcpy (&lease->host_address.un,
+ (u8 *) & client->installed.leased_address,
sizeof (ip4_address_t));
- clib_memcpy (&lease->router_address.un, (u8 *) & client->router_address,
+ clib_memcpy (&lease->router_address.un,
+ (u8 *) & client->installed.router_address,
sizeof (ip4_address_t));
lease->count = vec_len (client->domain_server_address);