Skip to content

feat(dpi): add support for source objects in DPI rules and address group management - #2014

Merged
Tbaile merged 3 commits into
release-8.9.0from
dpi_rules_object_source
Nov 19, 2026
Merged

Tbaile merged 3 commits into
release-8.9.0from
dpi_rules_object_source

Conversation

@m-dilorenzi

@m-dilorenzi m-dilorenzi commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

DPI rules can now use firewall objects as source, next to typed addresses: object changes are applied to the rules automatically and existing rules keep working unchanged.

  • New list-source-objects API returns the objects usable as source: host sets, DHCP reservations, DNS records and VPN users with a reserved IP; domain sets are excluded
  • add-rule and edit-rule APIs accept source_objects, a list of object ids; missing objects, domain sets and users without a reserved IP are rejected, and objects can't be combined with typed addresses
  • list-rules API returns source_objects with name, type and subtype; an object no longer existing is reported with its id as name
  • Every object resolving to addresses has its netifyd address group, /etc/netifyd/address-groups.d/30-.conf, matched by the rule criteria as local_ip == @: an object change rewrites only its file, never the rules
  • The groups are written when object changes are committed and when a Road Warrior account changes; netifyd is reloaded only when a file changed, and files of objects gone or without addresses are removed
  • Addresses are written the way netifyd matches them: ranges, including reversed ones, become CIDR blocks, IPv4-mapped IPv6 addresses become IPv4, /0 networks are split in two halves
  • A new address-groups service rewrites the groups at boot, before netifyd starts, removing the stale ones netifyd saves back when it stops
  • The groups are kept in backups and across image upgrades through /lib/upgrade/keep.d/ns-dpi
  • Objects used by a DPI rule can't be deleted, and the reserved IP of a Road Warrior account used as an object can't be removed (reserved_ip_is_used)

Closes: #1985

@m-dilorenzi
m-dilorenzi requested a review from Tbaile November 12, 2026 14:33
@m-dilorenzi m-dilorenzi self-assigned this Nov 12, 2026
@m-dilorenzi
m-dilorenzi force-pushed the dpi_rules_object_source branch from 2c1f0ae to 536e490 Compare November 12, 2026 14:50
@m-dilorenzi
m-dilorenzi marked this pull request as ready for review November 16, 2026 11:00
@m-dilorenzi
m-dilorenzi requested a review from Tbaile November 17, 2026 11:22
@Tbaile
Tbaile merged commit cdc33d1 into release-8.9.0 Nov 19, 2026
7 checks passed
@Tbaile
Tbaile deleted the dpi_rules_object_source branch November 19, 2026 13:07
Tbaile pushed a commit that referenced this pull request Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants