From c2a1f1373fc96aabb62f49a0a498901da32ab357 Mon Sep 17 00:00:00 2001 From: Jack Doan Date: Fri, 20 Sep 2024 15:49:38 -0400 Subject: [PATCH] error if setting route MTU fails --- overlay/tun_linux.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/overlay/tun_linux.go b/overlay/tun_linux.go index 0fa9cffe1..1bf503abb 100644 --- a/overlay/tun_linux.go +++ b/overlay/tun_linux.go @@ -375,10 +375,9 @@ func (t *tun) Activate() error { //set route MTU for i := range t.vpnNetworks { - if err := t.setDefaultRoute(t.vpnNetworks[i]); err != nil { + if err = t.setDefaultRoute(t.vpnNetworks[i]); err != nil { t.l.WithError(err).Error("Failed to add routes") - //todo why does this fail but only sometimes? - //todo return err + return err } }