mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-02-23 00:53:15 +08:00
fix: route on android
This commit is contained in:
parent
9b999e72ce
commit
39e7832676
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user