mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Fix bug in tag-matching logic with negated tags.
This commit is contained in:
@@ -111,6 +111,13 @@ struct dhcp_netid *option_filter(struct dhcp_netid *tags, struct dhcp_netid *con
|
|||||||
last_tag->next = tags;
|
last_tag->next = tags;
|
||||||
tagif = run_tag_if(context_tags);
|
tagif = run_tag_if(context_tags);
|
||||||
|
|
||||||
|
/* reset stuff with tag:!<tag> which now matches. */
|
||||||
|
for (opt = opts; opt; opt = opt->next)
|
||||||
|
if (!(opt->flags & (DHOPT_ENCAPSULATE | DHOPT_VENDOR | DHOPT_RFC3925)) &&
|
||||||
|
(opt->flags & DHOPT_TAGOK) &&
|
||||||
|
!match_netid(opt->netid, tagif, 0))
|
||||||
|
opt->flags &= ~DHOPT_TAGOK;
|
||||||
|
|
||||||
for (opt = opts; opt; opt = opt->next)
|
for (opt = opts; opt; opt = opt->next)
|
||||||
if (!(opt->flags & (DHOPT_ENCAPSULATE | DHOPT_VENDOR | DHOPT_RFC3925 | DHOPT_TAGOK)) &&
|
if (!(opt->flags & (DHOPT_ENCAPSULATE | DHOPT_VENDOR | DHOPT_RFC3925 | DHOPT_TAGOK)) &&
|
||||||
match_netid(opt->netid, tagif, 0))
|
match_netid(opt->netid, tagif, 0))
|
||||||
|
|||||||
Reference in New Issue
Block a user