vishvananda/netlink

RouteAdd with src: invalid argument

Opened this issue · 1 comments

aep commented

this works:

ip -6 route add default via fd00::1  dev eth0 src fd00::2

this doesnt

netlink.RouteAdd(&netlink.Route{
  LinkIndex: eth0.Attrs().Index,
  Gw:        net.ParseIP("fd00::1"),
  Src:      net.ParseIP("fd00::2"),
 })      

without src, its fine

aep commented

this appears to be a timing issue. just waiting a second makes it work. i guess calling iproute2 cli just takes longer.
is it possible that this needs link local addresses? do we have a way to wait for them?