Skip to content

Commit 1690292

Browse files
committed
fix some problems for vpn_hostnet_integration_test.go
1 parent 867825e commit 1690292

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

vpn/netstate/vpn_hostnet_integration_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,9 @@ func TestGatewayHostNetRoutesStalenessReconcile(t *testing.T) {
294294
// The IPv6 counterpart of R4. RA re-advertising a new router/prefix changes the
295295
// v6 default far more often than IPv4 changes, so the monitor must mirror v6
296296
// default changes into tableID too (marked libp2p v6 sockets otherwise fall
297-
// through to the `unreachable ::/0` fence and get EHOSTUNREACH). We simulate a
297+
// through to the TUN default and exit the VPN). We simulate a
298298
// new v6 uplink with a high-metric default via a dummy interface and assert the
299-
// awl table follows both edges without disturbing the fence or the TUN default.
299+
// awl table follows both edges without disturbing the TUN default.
300300
func TestGatewayHostNetRoutesStalenessReconcileV6(t *testing.T) {
301301
verifyNoLeaks(t)
302302
requireRoot(t)
@@ -332,7 +332,7 @@ func TestGatewayHostNetRoutesStalenessReconcileV6(t *testing.T) {
332332
}, 5*time.Second, 100*time.Millisecond,
333333
"the monitor must copy the new host IPv6 default into the awl exemption table")
334334

335-
// The unreachable fence and TUN default must be untouched by the reconcile.
335+
// The IPv6 TUN route must be untouched by the reconcile.
336336
assertRoutesApplied(t)
337337

338338
// Remove the second v6 default; the awl table copy must follow.
@@ -479,11 +479,11 @@ func assertRoutesApplied(t *testing.T) {
479479
require.Contains(t, rules6, fmt.Sprintf("fwmark 0x%x", awlMark), "v6 fwmark ip rule")
480480
require.Contains(t, rules6, fmt.Sprintf("lookup %d", tableID), "v6 ip rule must steer to the awl table")
481481

482-
// Anchor the metric to the unreachable line so an unrelated host route can't
482+
// Anchor the metric to the awl0 route so an unrelated host route can't
483483
// satisfy it.
484484
main6 := cmdOut(t, "ip", "-6", "route", "show")
485-
require.Regexp(t, fmt.Sprintf(`unreachable default.*metric %d`, tunRouteMetric), main6,
486-
"IPv6 unreachable fence present at the expected metric")
485+
require.Regexp(t, fmt.Sprintf(`default dev %s.*metric %d`, testTunIf, tunRouteMetric), main6,
486+
"IPv6 TUN route present at the expected metric")
487487
}
488488

489489
// ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)