headscale/hscontrol
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
..
assets assets: fix logo alignment and error icon centering 2026-04-13 17:23:47 +01:00
capver capver: regenerate for tailscale v1.96 2026-04-08 13:00:22 +01:00
db all: rephrase prose to fit codebase voice 2026-04-29 16:22:19 +01:00
derp all: fix golangci-lint issues (#3064) 2026-02-06 21:45:32 +01:00
dns Fix typo in comment about fsnotify behavior 2026-02-27 15:23:06 +01:00
mapper types/node, mapper: strip own IPv4 from emission when node has disable-ipv4 cap 2026-05-13 14:22:30 +02:00
policy types/node, mapper: strip own IPv4 from emission when node has disable-ipv4 cap 2026-05-13 14:22:30 +02:00
servertest types/config, types/node: model default-auto-update from auto_update.enabled 2026-05-13 14:22:30 +02:00
state mapper, state: deliver nodeAttrs through MapResponse and harden nextdns DoH rewrite 2026-05-13 14:22:30 +02:00
templates all: rephrase prose to fit codebase voice 2026-04-29 16:22:19 +01:00
types types/node, mapper: strip own IPv4 from emission when node has disable-ipv4 cap 2026-05-13 14:22:30 +02:00
util hscontrol: route hostname handling through dnsname and NodeStore 2026-04-18 15:12:21 +01:00
app.go app: add security headers middleware 2026-04-17 16:31:49 +01:00
app_test.go app: add security headers middleware 2026-04-17 16:31:49 +01:00
auth.go hscontrol: route hostname handling through dnsname and NodeStore 2026-04-18 15:12:21 +01:00
auth_tags_test.go state: note tagged-path coverage and self-healing behaviour for #3199 2026-04-29 13:06:38 +01:00
auth_test.go state: avoid nil deref in registration handlers when old user is missing 2026-05-06 07:23:02 +01:00
debug.go debug: explain URLIsNoise choice in ping callback 2026-04-17 16:31:49 +01:00
grpcv1.go policy/v2: evaluate the tests block on user-initiated writes 2026-05-12 11:54:54 +01:00
grpcv1_test.go all: rephrase prose to fit codebase voice 2026-04-29 16:22:19 +01:00
handlers.go oidc: render HTML error pages for browser-facing failures 2026-04-13 17:23:47 +01:00
handlers_test.go oidc: render HTML error pages for browser-facing failures 2026-04-13 17:23:47 +01:00
metrics.go all: fix golangci-lint issues (#3064) 2026-02-06 21:45:32 +01:00
noise.go noise: reject non-HEAD on PingResponseHandler 2026-04-17 16:31:49 +01:00
noise_test.go policy/v2: align SSH check action with SaaS wire format 2026-04-17 16:31:49 +01:00
oidc.go oidc: render HTML error pages for browser-facing failures 2026-04-13 17:23:47 +01:00
oidc_confirm_test.go oidc: add confirmation page for node registration 2026-04-10 14:09:57 +01:00
oidc_template_test.go oidc: render HTML error pages for browser-facing failures 2026-04-13 17:23:47 +01:00
oidc_test.go oidc: make email verification configurable 2025-12-18 11:42:32 +00:00
platform_config.go all: fix golangci-lint issues (#3064) 2026-02-06 21:45:32 +01:00
poll.go types: add node.expiry config, deprecate oidc.expiry 2026-04-08 13:00:22 +01:00
poll_test.go poll: fix poll test linter violations 2026-03-12 01:27:34 -07:00
tailsql.go all: fix golangci-lint issues (#3064) 2026-02-06 21:45:32 +01:00
templates_consistency_test.go Update links to Tailscale documentation 2026-04-18 09:33:41 +02:00