Netclient v0.21.0 on Windows - False Egress Routes
The netclient do not passes correctly the external routes of the egress nodes on my network.
The problem is on file wireguard_windows.go
mask := net.IP(addr.Network.Mask) slog.Info("adding route to interface", "route", fmt.Sprintf("%s -> %s", addr.IP.String(), addr.Network.String())) cmd := fmt.Sprintf("route -p add %s MASK %v %s", addr.IP.String(),mask,addr.IP.String()) _, err := ncutils.RunCmd(cmd, false) if err != nil { slog.Error("failed to apply", "egress range", addr.IP.String()) }
The command that is created above route -p add %s MASK %v %s", addr.IP.String(),mask,addr.IP.String()
Passes two times the addr.IP.String() that is the windows netmaker interface address
it should be like following
route -p add %s MASK %v %s", addr.Network.String(),mask,addr.IP.String()
The wrong route that is produced it is indeed passing to the routing table of the windows machine