dhcp-server: Fill in DNS info in lease objects
PATCH 1/1 dhcp-server: Fill in DNS info in lease objects
Copy the DNS info that we send to the client also to the lease object that we keep on our side for our own tracking, same as we copy the IP, the gateway, the netmask etc.
--- ell/dhcp-server.c | 7 +++++++ 1 file changed, 7 insertions(+)
ell/dhcp-server.c +7 -0
@@ -316,6 +316,13 @@ static struct l_dhcp_lease *add_lease(struct l_dhcp_server *server, lease->subnet_mask = server->netmask; lease->router = server->gateway; +if (server->dns_list) { +unsigned int i; + +for (i =0 ; server->dns_list[i]; i++); + lease->dns =l_memdup (server->dns_list, (i +1 ) *4 ); + } +if (client_id) lease->client_id =l_memdup (client_id, client_id[0 ] +1 );
Signature · 1 line
2.30.2
Denis Kenzior
AppliedHi Andrew,
Quoted 7 lines · Andrew Zaborowski
Copy the DNS info that we send to the client also to the lease object that we keep on our side for our own tracking, same as we copy the IP, the gateway, the netmask etc.
--- ell/dhcp-server.c | 7 +++++++ 1 file changed, 7 insertions(+)
Applied, thanks.
Regards,
-Denis