mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Add DNSMASQ_REQUESTED_OPTIONS env-var to lease change script.
This commit is contained in:
@@ -44,6 +44,9 @@ version 2.77
|
|||||||
to Donatas Abraitis for diagnosing this as a potential
|
to Donatas Abraitis for diagnosing this as a potential
|
||||||
problem.
|
problem.
|
||||||
|
|
||||||
|
Add DNSMASQ_REQUESTED_OPTIONS environment variable to the
|
||||||
|
lease-change script. Thanks to ZHAO Yu for the patch.
|
||||||
|
|
||||||
|
|
||||||
version 2.76
|
version 2.76
|
||||||
Include 0.0.0.0/8 in DNS rebind checks. This range
|
Include 0.0.0.0/8 in DNS rebind checks. This range
|
||||||
|
|||||||
@@ -1543,6 +1543,8 @@ DHCP relay-agent added any of these options.
|
|||||||
|
|
||||||
If the client provides vendor-class, DNSMASQ_VENDOR_CLASS.
|
If the client provides vendor-class, DNSMASQ_VENDOR_CLASS.
|
||||||
|
|
||||||
|
DNSMASQ_REQUESTED_OPTIONS a string containing the decimal values in the Parameter Request List option, comma separated, if the parameter request list option is provided by the client.
|
||||||
|
|
||||||
For IPv6 only:
|
For IPv6 only:
|
||||||
|
|
||||||
If the client provides vendor-class, DNSMASQ_VENDOR_CLASS_ID,
|
If the client provides vendor-class, DNSMASQ_VENDOR_CLASS_ID,
|
||||||
|
|||||||
@@ -556,6 +556,7 @@ int create_helper(int event_fd, int err_fd, uid_t uid, gid_t gid, long max_fd)
|
|||||||
buf = grab_extradata(buf, end, "DNSMASQ_CIRCUIT_ID", &err);
|
buf = grab_extradata(buf, end, "DNSMASQ_CIRCUIT_ID", &err);
|
||||||
buf = grab_extradata(buf, end, "DNSMASQ_SUBSCRIBER_ID", &err);
|
buf = grab_extradata(buf, end, "DNSMASQ_SUBSCRIBER_ID", &err);
|
||||||
buf = grab_extradata(buf, end, "DNSMASQ_REMOTE_ID", &err);
|
buf = grab_extradata(buf, end, "DNSMASQ_REMOTE_ID", &err);
|
||||||
|
buf = grab_extradata(buf, end, "DNSMASQ_REQUESTED_OPTIONS", &err);
|
||||||
}
|
}
|
||||||
|
|
||||||
buf = grab_extradata(buf, end, "DNSMASQ_TAGS", &err);
|
buf = grab_extradata(buf, end, "DNSMASQ_TAGS", &err);
|
||||||
|
|||||||
@@ -1304,6 +1304,24 @@ size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index,
|
|||||||
add_extradata_opt(lease, NULL);
|
add_extradata_opt(lease, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* DNSMASQ_REQUESTED_OPTIONS */
|
||||||
|
if ((opt = option_find(mess, sz, OPTION_REQUESTED_OPTIONS, 1)))
|
||||||
|
{
|
||||||
|
int 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);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
add_extradata_opt(lease, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
/* space-concat tag set */
|
/* space-concat tag set */
|
||||||
if (!tagif_netid)
|
if (!tagif_netid)
|
||||||
add_extradata_opt(lease, NULL);
|
add_extradata_opt(lease, NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user