feat(wireguard): add debug logs for IPv6 detection

- To debug issue #998
- Enable with `LOG_LEVEL=debug`
This commit is contained in:
Quentin McGaw
2022-05-27 16:56:20 +00:00
parent eb71cfb144
commit 7fd45cf17f
6 changed files with 55 additions and 16 deletions

View File

@@ -19,7 +19,9 @@ func (w *Wireguard) addRoute(link netlink.Link, dst *net.IPNet,
err = w.netlink.RouteAdd(route)
if err != nil {
return fmt.Errorf("cannot add route %s: %w", route, err)
return fmt.Errorf(
"cannot add route for link %s, destination %s and table %d: %w",
link.Attrs().Name, dst, firewallMark, err)
}
return err