Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Routes do not set the Flags field correctly #1053

Open
fs185143 opened this issue Jan 23, 2025 · 0 comments
Open

Routes do not set the Flags field correctly #1053

fs185143 opened this issue Jan 23, 2025 · 0 comments

Comments

@fs185143
Copy link

I have a route (via /proc/net/route):

Iface   Destination     Gateway         Flags   RefCnt  Use     Metric  Mask            MTU     Window  IRTT                                                       
eth0    00000000        014014AC        0003    0       0       0       00000000        0       0       0                                                                               

but if I do

link, err := netlink.LinkByName("eth0")
if err != nil {
  return err
}
routeList, err := netlink.RouteList(link, unix.AF_INET)
if err != nil {
  return err
}

then the route returned has route.Flags=0, when it should be 3. I have verified that the rest of the details match the above route, but the flags are not retrieved correctly.

This is on version v1.3.0.

@fs185143 fs185143 changed the title Routes do not set the Flags field Routes do not set the Flags field correctly Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant