From ab591906c8f743b76ba20668693158e969aed951 Mon Sep 17 00:00:00 2001 From: Tom DNetto Date: Wed, 28 Sep 2022 11:01:05 -0700 Subject: [PATCH] wgengine/router: Increase range of rule priorities when detecting mwan3 Context: https://github.com/tailscale/tailscale/pull/5588#issuecomment-1260655929 It seems that if the interface at index 1 is down, the rule is not installed. As such, we increase the range we detect up to 2004 in the hope that at least one of the interfaces 1-4 will be up. Signed-off-by: Tom DNetto --- wgengine/router/router_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wgengine/router/router_linux.go b/wgengine/router/router_linux.go index b67d4ddc1..7fddf875d 100644 --- a/wgengine/router/router_linux.go +++ b/wgengine/router/router_linux.go @@ -1713,7 +1713,7 @@ func checkOpenWRTUsingMWAN3() (bool, error) { // // We dont match on the mask because it can vary, or the // table because I'm not sure if it can vary. - if r.Priority == 2001 && r.Mark != 0 { + if r.Priority >= 2001 && r.Priority <= 2004 && r.Mark != 0 { return true, nil } }