[roads] QA F-02: going direct never takes what the tunnel carries out of it
A goes-direct subnet was only checked to be canonical, and the kill switch dropped it only when it reached the internet, so 100.96.0.0/16 (every mesh address) or the home LAN that the plan routes into the tunnel compiled cleanly. Now, decided here because the plan has to say which route wins: - a goes-direct subnet other than /0 that holds a mesh address is refused (direct.mesh); - per device, a direct subnet inside a net the plan tunnels is dropped and reported (direct.tunnelled); - a direct subnet that holds tunnelled nets keeps them in the tunnel, listed in the new plan field direct[].except. A platform that cannot honour except (an app-level bypass) must not apply the entry. The F-02 test now checks that every overlap is covered by except, and that only the mesh subnet is refused. Golden plans and the pinned jana-phone digest are regenerated: the only change is the except lists. Plan format 1 has not been released, so it changes in place.
This commit is contained in:
+3
-2
@@ -57,7 +57,7 @@ is not `key: value`, or a bad quoted string, is `yaml.syntax`.
|
||||
| `id` | yes | 6 characters of `0123456789abcdefghjkmnpqrstvwxyz` (no `i l o u`), random | `id.format`; must equal the file name's prefix (`id.file-name`); unique in the store (`id.duplicate`, both files grant nothing) |
|
||||
| `subject` | yes | a reference (below): `person:`, `group:`, `device:` or `app:` | `ref.format`, `subject.kind` (not allowed for the verb), `subject.unknown` (not in the snapshots) |
|
||||
| `verb` | yes | `can-reach`, `exits-through`, `goes-direct`, `never-online-without`, `custom` | `verb.unknown` |
|
||||
| `object` | yes, except `custom` (where it is not allowed) | a reference: `device:`, `subnet:`, `service:` or `exit:` | `ref.format`, `object.kind`, `object.unknown`, `object.not-exit`, `subnet.not-canonical`, `subnet.unrouted` |
|
||||
| `object` | yes, except `custom` (where it is not allowed) | a reference: `device:`, `subnet:`, `service:` or `exit:` | `ref.format`, `object.kind`, `object.unknown`, `object.not-exit`, `subnet.not-canonical`, `subnet.unrouted`; a `goes-direct` subnet other than `/0` that holds a mesh address is `direct.mesh` (mesh traffic never goes direct, QA F-02) |
|
||||
| `until` | no | RFC 3339 with an offset: `2026-11-29T23:59:59+01:00` or `…Z`; exclusive | `until.format`; `until <= now` makes the road *inactive* (`road.expired`) |
|
||||
| `ports` | no; only `can-reach` | a list of `tcp/443`, `udp/53`, `tcp/8000-8100`, `tcp`, `udp`, `icmp`; absent means all traffic | `ports.format`; for a service, every port must be one it serves (`ports.not-served`) |
|
||||
| `via` | no; only `can-reach` | `device:<key>` of a device with `relay` or `exit` | `via.format`, `via.unknown`, `via.not-relay` |
|
||||
@@ -125,6 +125,7 @@ Valid roads that grant nothing right now, reported with their reason (not errors
|
||||
| `road.no-devices` | the subject has no devices |
|
||||
| `road.self` | every subject device is the object's own device |
|
||||
| `exit.conflict` | for one device: active `exits-through` roads to two different exits (that device gets neither; reported per road, naming the device) |
|
||||
| `direct.tunnelled` | for one device: a `goes-direct` subnet inside a net its plan sends through the tunnel (a route it reaches, a peer's address); the tunnel wins and the entry is dropped (reported per road, naming the device, QA F-02) |
|
||||
| `road.family` | a `can-reach` road from devices whose mesh address is IPv4 to an IPv6 place, or the other way: those devices get nothing (a rule that could never match), reported naming them (QA F-06) |
|
||||
| `direct.kill-switch` | for one device with a kill switch: a `goes-direct` road to a subnet that reaches the internet; the kill switch wins and the subnet stays in the tunnel (reported per road, naming the device). Going direct to a private subnet stays allowed |
|
||||
|
||||
@@ -201,7 +202,7 @@ entry.
|
||||
| `dns[]` | `host`, `address`, `roads`: names this device may resolve to a mesh address |
|
||||
| `exit` | `{through, roads}` or `null` |
|
||||
| `kill_switch` | `{through, roads}` or `null`. `through` is `null` (only the mesh) when two kill-switch roads disagree, or when a kill-switch road has an error: a restriction fails closed, it is never dropped (QA F-03). `roads` lists the erroneous road too |
|
||||
| `direct[]` | `{app, subnet, roads}`: traffic to `subnet` bypasses the tunnel (split tunnelling); `app` is `null` for all traffic, or the one app whose traffic goes direct |
|
||||
| `direct[]` | `{app, subnet, except, roads}`: traffic to `subnet` bypasses the tunnel (split tunnelling); `app` is `null` for all traffic, or the one app whose traffic goes direct. `except` lists the nets inside `subnet` that this plan sends through the tunnel (its peers' non-default allowed IPs): they stay in the tunnel, whatever the platform's route order. A platform that cannot keep them in (an app-level bypass) must not apply the entry (QA F-02) |
|
||||
| `custom[]` | `{road, classic, raw}`: the raw block verbatim, **never checked by the compiler** |
|
||||
|
||||
`internet` is every address except `0.0.0.0/8`, `10.0.0.0/8`, `100.64.0.0/10`, `127.0.0.0/8`, `169.254.0.0/16`,
|
||||
|
||||
Reference in New Issue
Block a user