fix: route on android
This commit is contained in:
parent
9b999e72ce
commit
39e7832676
1 changed files with 1 additions and 11 deletions
|
@ -49,16 +49,6 @@ func ConfigInterfaceAddress(dev device.Device, addr netip.Prefix, forceMTU int,
|
||||||
return err
|
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 {
|
if autoRoute {
|
||||||
err = configInterfaceRouting(metaLink.Attrs().Index, interfaceName, ip)
|
err = configInterfaceRouting(metaLink.Attrs().Index, interfaceName, ip)
|
||||||
}
|
}
|
||||||
|
@ -80,7 +70,7 @@ func configInterfaceRouting(index int, interfaceName string, ip netip.Addr) erro
|
||||||
Protocol: 2,
|
Protocol: 2,
|
||||||
Src: ip.AsSlice(),
|
Src: ip.AsSlice(),
|
||||||
Dst: ipn,
|
Dst: ipn,
|
||||||
Table: 254,
|
Table: tableId,
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue