headscale/hscontrol/policy/v2/testdata/nodeattrs_results
Kristoffer Dalby 5d502bfb88 types/node, mapper: strip own IPv4 from emission when node has disable-ipv4 cap
When a node carries the disable-ipv4 nodeAttr documented at
https://tailscale.com/docs/reference/troubleshooting/network-configuration/cgnat-conflicts,
SaaS stops sending the node's CGNAT IPv4 prefix in MapResponse. The
allocator keeps assigning IPv4 server-side; only the wire-shape
delivery is filtered. Subnet routes the node advertises -- including
IPv4 prefixes -- survive in AllowedIPs and PrimaryRoutes.

TailNode now drops Is4 prefixes from Addresses and from the node's
own /32 slot in AllowedIPs when selfPolicyCaps carries
disable-ipv4. Mapper.buildTailPeers passes each peer's policy
CapMap so the filter applies in viewer netmaps too; the CapMap
merge that follows is overwritten by PeerCapMap so only the address
filter survives on the peer path.

Two captures land in testdata/nodeattrs_results to anchor the
behaviour:

  - nodeattrs-attr-c15-disable-ipv4         (on tag:client)
  - nodeattrs-attr-c16-disable-ipv4-router  (on tag:router, which
    advertises 10.33.0.0/16, confirming subnet routes survive)
2026-05-13 14:22:30 +02:00
..
nodeattrs-attr-c1-funnel.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-attr-c2-randomize.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-attr-c3-captive.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-attr-c4-magicdns-aaaa.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-attr-c5-taildrive-share.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-attr-c6-taildrive-access-only.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-attr-c7-file-sharing.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-attr-c8-admin.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-attr-c9-ssh.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-attr-c10-disable-relay-server.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-attr-c11-unknown.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-attr-c12-cap-with-query.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-attr-c13-suggest-exit-node.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-attr-c14-suggest-exit-node-approved.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-attr-c15-disable-ipv4.hujson types/node, mapper: strip own IPv4 from emission when node has disable-ipv4 cap 2026-05-13 14:22:30 +02:00
nodeattrs-attr-c16-disable-ipv4-router.hujson types/node, mapper: strip own IPv4 from emission when node has disable-ipv4 cap 2026-05-13 14:22:30 +02:00
nodeattrs-error-e1-empty.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-error-e2-bad-target.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-error-e3-autogroup-self.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-error-e4-reserved-ippool.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-error-e5-empty-target-array.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-error-e6-tag-not-defined.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-error-e7-empty-nodeAttrs.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-funnel-f1-tag.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-funnel-f2-user.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-interaction-h1-with-acls.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-interaction-h2-with-grants.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-interaction-h3-policy-uses-everything.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-ippool-g1-admin.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-ippool-g2-group.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-ippool-g3-mixed.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-merge-b1-union.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-merge-b2-overlap.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-merge-b3-same-target-twice.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-merge-b4-duplicate-attr.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-merge-b5-multiple-nextdns.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-nextdns-d1-profile.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-nextdns-d2-no-device-info.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-nextdns-d3-per-tag.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-tailnet-devices-auto-updates-off.hujson types/config, types/node: model default-auto-update from auto_update.enabled 2026-05-13 14:22:30 +02:00
nodeattrs-tailnet-devices-auto-updates-on.hujson types/config, types/node: model default-auto-update from auto_update.enabled 2026-05-13 14:22:30 +02:00
nodeattrs-tailnet-magicdns-on.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-target-a1-wildcard.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-target-a2-user.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-target-a3-tag.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-target-a4-group.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-target-a5-autogroup-member.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-target-a6-autogroup-tagged.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-target-a7-mixed.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-target-a8-host.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-target-a9-prefix.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-target-a10-autogroup-admin.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-target-a11-autogroup-owner.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-target-a12-tag-vs-autogroup-member.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-toplevel-randomize-client-port.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
nodeattrs-toplevel-randomize-plus-nodeattrs.hujson policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00