add entrypoint for router handler

This commit is contained in:
ginuerzh
2025-02-08 23:07:54 +08:00
parent 9cd03b6b59
commit 08ad260606
14 changed files with 259 additions and 122 deletions
+1 -5
View File
@@ -52,14 +52,10 @@ func (l *tunListener) addRoutes(ifce *net.Interface) error {
if route.Net == nil {
continue
}
gw := net.ParseIP(route.Gateway)
if gw == nil {
continue
}
r := netlink.Route{
Dst: route.Net,
Gw: gw,
Gw: net.ParseIP(route.Gateway),
}
if r.Gw == nil {
r.LinkIndex = ifce.Index