Repository navigation
fix(dpi): refuse IPv6 zones in rule sources - #2036
Merged
Merged
Conversation
A typed rule source like fe80::1%x) || (true passed validation, as Python accepts any text after % as an IPv6 zone. The text was copied as is into the netifyd rule expression: netifyd failed to parse it, exited and kept restarting, so no DPI rule was applied anymore. Refuse sources with a zone, and drop the zone of a value saved before, e.g. restored from a backup, so it can't break netifyd anymore. Assisted-by: Claude Code:claude-sonnet-5-5 Claude-Session: https://claude.ai/code/session_01MSZ8Qpvy99zcMqD5JUBamg
gsanchietti
marked this pull request as ready for review
November 20, 2026 15:31
m-dilorenzi
approved these changes
Nov 20, 2026
Tbaile
approved these changes
Nov 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem
A DPI rule can have typed source addresses. An IPv6 address may carry a "zone" after a
%, likefe80::1%eth0. Python accepts any text as the zone, so a source likefe80::1%x) || (truepassed validation.That text was copied as is into the rule that netifyd reads:
netifyd can't parse it. It logs
criteria parse error, exits, gets restarted, and fails again. While it loops, no DPI rule is applied at all: one bad source disables every rule on the firewall.Reproduced on a test unit: after adding such a rule, an application blocked by another, unrelated rule was no longer blocked.
This comes from the typed source validation added with the DPI rework, not from the source objects change.
The fix
%are refused withinvalid_source. A zone has no meaning when matching a local address.Tested
fe80::1%x) || (true; the same value written directly into the config becomeslocal_ip == fe80::1, netifyd stays up and the other rules keep blocking.https://claude.ai/code/session_01MSZ8Qpvy99zcMqD5JUBamg