headscale/hscontrol/types
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
..
change change: document PingRequest merge first-wins foot-gun 2026-04-17 16:31:49 +01:00
testcapture policy/v2: SaaS-derived compat tests for nodeAttrs 2026-05-13 14:22:30 +02:00
testdata
api_key.go
common.go oidc: add confirmation page for node registration 2026-04-10 14:09:57 +01:00
common_test.go oidc: add confirmation page for node registration 2026-04-10 14:09:57 +01:00
config.go types/config, types/node: model default-auto-update from auto_update.enabled 2026-05-13 14:22:30 +02:00
config_test.go types: omit secret fields from JSON marshalling 2026-04-10 14:09:57 +01:00
const.go
debug_routes.go types: move DebugRoutes from routes to types 2026-04-29 18:08:39 +01:00
main_test.go
node.go types/node, mapper: strip own IPv4 from emission when node has disable-ipv4 cap 2026-05-13 14:22:30 +02:00
node_benchmark_test.go
node_tags_test.go
node_test.go hscontrol: route hostname handling through dnsname and NodeStore 2026-04-18 15:12:21 +01:00
policy.go
preauth_key.go
preauth_key_test.go
registration.go state: replace zcache with bounded LRU for auth cache 2026-04-10 14:09:57 +01:00
routes.go
testlog.go hscontrol/types: silence zerolog by default in tests 2026-04-17 16:31:49 +01:00
types_clone.go hscontrol/types: regenerate types_clone.go for viewer bump 2026-05-11 08:46:12 +01:00
types_view.go types: add Unhealthy and SessionEpoch fields to Node 2026-04-29 18:08:39 +01:00
users.go oidc: handle groups claim as string or array (FlexibleStringSlice) 2026-05-04 15:26:53 +02:00
users_test.go oidc: handle groups claim as string or array (FlexibleStringSlice) 2026-05-04 15:26:53 +02:00
version.go all: apply formatter changes 2026-04-13 17:23:47 +01:00