mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Update man page on DHCP data provided to scripts. Provide requested options for DHCPv6 also.
This commit is contained in:
@@ -1420,20 +1420,15 @@ size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index,
|
||||
/* DNSMASQ_REQUESTED_OPTIONS */
|
||||
if ((opt = option_find(mess, sz, OPTION_REQUESTED_OPTIONS, 1)))
|
||||
{
|
||||
int len = option_len(opt);
|
||||
int i, len = option_len(opt);
|
||||
unsigned char *rop = option_ptr(opt, 0);
|
||||
char *q = daemon->namebuff;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
q += snprintf(q, MAXDNAME - (q - daemon->namebuff), "%d%s", rop[i], i + 1 == len ? "" : ",");
|
||||
}
|
||||
lease_add_extradata(lease, (unsigned char *)daemon->namebuff, (q - daemon->namebuff), 0);
|
||||
lease_add_extradata(lease, (unsigned char *)daemon->namebuff,
|
||||
sprintf(daemon->namebuff, "%u", rop[i]), (i + 1) == len ? 0 : ',');
|
||||
}
|
||||
else
|
||||
{
|
||||
add_extradata_opt(lease, NULL);
|
||||
}
|
||||
lease_add_extradata(lease, NULL, 0, 0);
|
||||
|
||||
add_extradata_opt(lease, option_find(mess, sz, OPTION_MUD_URL_V4, 1));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user