Skip to content

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

Closed

Description

@sniperking1234

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?

Activity

  1. added this to the Unreleased milestone on Aug 3, 2020
  2. tklauser commented on Aug 3, 2020

    @tklauser
    Member

    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.

  3. locked and limited conversation to collaborators on Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions