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

x/sys: Increase the number of linux routing tables #40542

Closed
sniperking1234 opened this issue Aug 3, 2020 · 1 comment
Closed

x/sys: Increase the number of linux routing tables #40542

sniperking1234 opened this issue Aug 3, 2020 · 1 comment

Comments

@sniperking1234
Copy link

sniperking1234 commented Aug 3, 2020

What version of Go are you using (go version)?

go version go1.14.4 linux/amd64

At present, the maximum number of routing tables is 32K.However, only 255 routing tables are supported in the code.

https://github.com/golang/sys/blob/4b90ce9b60b31bd0d0cbceb17532b5c810912f88/unix/ztypes_linux.go#L614

Should the code be modified to support a larger number of routing tables?

@gopherbot gopherbot added this to the Unreleased milestone Aug 3, 2020
@tklauser
Copy link
Member

tklauser commented Aug 3, 2020

I don't think there's anything we need to change in x/sys. type RtMsg and all the other types in ztypes_*.go are auto-generated from kernel headers. These types need to correspond to the respective type expected by the kernel.

As a side-note (unrelated to x/sys): RTA_TABLE rtnetlink attributes are probably what you are looking for, see https://man7.org/linux/man-pages/man7/rtnetlink.7.html. If such an attribute is present its value is used as the table ID and the the table field in struct rt_msg is ignored.

@tklauser tklauser closed this as completed Aug 3, 2020
@golang golang locked and limited conversation to collaborators Aug 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants