You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was using the plugin to get the default route through NewRouteInfo on my IPv6 deployment and seems like the method doesn't take in account IPv6 and only provides default route for IPv4
here is the snippet of the NewRouteInfo under route_info_linux.go
funcNewRouteInfo() (routeInfo, error) {
// CoreOS Container Linux moved ip to /usr/bin/ip, so look it up on// $PATH and fallback to /sbin/ip on error.path, _:=exec.LookPath("ip")
ifpath=="" {
path="/sbin/ip"
}
returnrouteInfo{
cmds: map[string][]string{"ip": {path, "route"}},
}, nil
}
Technically it path should take in account ip -6 for ipv6 as running above command on the IPv6 box returns
[root@console-kunal ~]# /sbin/ip route show default <--- returns nothing on IPv6
[root@console-kunal ~]# ip -6 addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN qlen 1000
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens192: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
inet6 fd0c:80bd:192:0:250:56ff:fe9e:c72/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::250:56ff:fe9e:c72/64 scope link
valid_lft forever preferred_lft forever
Expected result would be something like this
root@console-kunal ~]# /sbin/ip -6 route show default
default via ip dev ens192 metric 1 pref medium
[root@console-kunal ~]#
The text was updated successfully, but these errors were encountered:
I was using the plugin to get the default route through NewRouteInfo on my IPv6 deployment and seems like the method doesn't take in account IPv6 and only provides default route for IPv4
here is the snippet of the NewRouteInfo under route_info_linux.go
Technically it path should take in account ip -6 for ipv6 as running above command on the IPv6 box returns
Expected result would be something like this
The text was updated successfully, but these errors were encountered: