From 39e78326763683c5cb88446e769396b5a3c2545b Mon Sep 17 00:00:00 2001 From: adlyq Date: Sat, 28 May 2022 23:29:22 +0800 Subject: [PATCH] fix: route on android --- listener/tun/ipstack/commons/router_android.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/listener/tun/ipstack/commons/router_android.go b/listener/tun/ipstack/commons/router_android.go index 812af547..68e90b8e 100644 --- a/listener/tun/ipstack/commons/router_android.go +++ b/listener/tun/ipstack/commons/router_android.go @@ -49,16 +49,6 @@ func ConfigInterfaceAddress(dev device.Device, addr netip.Prefix, forceMTU int, return err } - if err = netlink.RouteAdd(&netlink.Route{ - LinkIndex: metaLink.Attrs().Index, - Scope: netlink.SCOPE_LINK, - Protocol: 2, - Src: ip.AsSlice(), - Table: 254, - }); err != nil { - return err - } - if autoRoute { err = configInterfaceRouting(metaLink.Attrs().Index, interfaceName, ip) } @@ -80,7 +70,7 @@ func configInterfaceRouting(index int, interfaceName string, ip netip.Addr) erro Protocol: 2, Src: ip.AsSlice(), Dst: ipn, - Table: 254, + Table: tableId, }); err != nil { return err }