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

NETLINK_ROUTE support #578

Open
6 of 11 tasks
ianlewis opened this issue Jul 22, 2019 · 9 comments
Open
6 of 11 tasks

NETLINK_ROUTE support #578

ianlewis opened this issue Jul 22, 2019 · 9 comments
Labels
area: compatibility Issue related to (Linux) kernel compatibility area: networking Issue related to networking priority: p3 Low priority type: enhancement New feature or request

Comments

@ianlewis
Copy link
Contributor

ianlewis commented Jul 22, 2019

Much of netlink socket route support is not implemented. Need to figure out the full scope of work needed to fully support.
See: http://man7.org/linux/man-pages/man7/rtnetlink.7.html

Rough list of scope:

  • ip route list
  • ip route get
  • ip route add
  • ip route del
  • ip addr list
  • ip addr add
  • ip addr del
  • ip link list
  • ip link add
  • ip link delete
  • ip link set eth0 up/down
@ianlewis ianlewis added type: enhancement New feature or request area: compatibility Issue related to (Linux) kernel compatibility area: networking Issue related to networking priority: p3 Low priority labels Jul 22, 2019
@prattmic
Copy link
Member

The existing support is sufficient for glibc getifaddrs(3) and basic ip route/addr and ifconfig support.

@ianlewis
Copy link
Contributor Author

ianlewis commented Jul 23, 2019

ip route is a WIP and will get merged shortly. #508

ip addr and ifconfig work right now. ip addr, ifconfig, ip route (after merge) are support read-only actions i.e. 'ip addr [list]', 'ip route [list]' etc. 'ip route add' and other actions to update interface, address, and route info are currently not supported.

@ghananigans
Copy link
Member

cc: @brunowonka

@liornm
Copy link
Contributor

liornm commented May 19, 2021

It seems like "ip route add" (RTM_NEWROUTE) is not yet supported (despite the check mark).

else if hdr.Flags&linux.NLM_F_REQUEST == linux.NLM_F_REQUEST {
		switch hdr.Type {
		case linux.RTM_GETLINK:
			return p.getLink(ctx, msg, ms)
		case linux.RTM_GETROUTE:
			return p.dumpRoutes(ctx, msg, ms)
		case linux.RTM_NEWADDR:
			return p.newAddr(ctx, msg, ms)
		case linux.RTM_DELADDR:
			return p.delAddr(ctx, msg, ms)
		default:
			return syserr.ErrNotSupported
		}
	}

Am I missing something?

@ianlewis
Copy link
Contributor Author

@liornm Yes. I'm not sure why that was checked. I updated the checklist.

@liornm
Copy link
Contributor

liornm commented May 20, 2021

@ianlewis Does anyone currently working on it?
I will be happy to contribute this.

@ianlewis
Copy link
Contributor Author

@liornm No one is currently working on it. Feel free to submit a PR for the parts you need.

@liornm
Copy link
Contributor

liornm commented May 20, 2021

Does the stack.RouteTable() ever being used for network routing purposes? Because I don't see any references except for the NETLINK_ROUTE.
Otherwise, where is the implementation of the actual routing table?

@ianlewis
Copy link
Contributor Author

RouteTable is only used for returning the route table to the user via netlink right now. If you're looking at adding RTM_NEWROUTE support, you'd likely need to add a new method to the inet.Stack interface and then implement where necessary. I think that's just netstack and hostinet.

copybara-service bot pushed a commit that referenced this issue Jul 22, 2021
Updates #578

PiperOrigin-RevId: 385798010
copybara-service bot pushed a commit that referenced this issue Jul 22, 2021
This change will allow us to remove the default link in a packetimpact test so
we can reduce indeterministic behaviors as required in https://fxbug.dev/78430.
This will also help with testing #1388.

Updates #578, #1388.

PiperOrigin-RevId: 385798010
copybara-service bot pushed a commit that referenced this issue Jul 29, 2021
This change will allow us to remove the default link in a packetimpact test so
we can reduce indeterministic behaviors as required in https://fxbug.dev/78430.
This will also help with testing #1388.

Updates #578, #1388.

PiperOrigin-RevId: 385798010
copybara-service bot pushed a commit that referenced this issue Jul 29, 2021
This change will allow us to remove the default link in a packetimpact test so
we can reduce indeterministic behaviors as required in https://fxbug.dev/78430.
This will also help with testing #1388.

Updates #578, #1388.

PiperOrigin-RevId: 385798010
copybara-service bot pushed a commit that referenced this issue Jul 30, 2021
This change will allow us to remove the default link in a packetimpact test so
we can reduce indeterministic behaviors as required in https://fxbug.dev/78430.
This will also help with testing #1388.

Updates #578, #1388.

PiperOrigin-RevId: 385798010
copybara-service bot pushed a commit that referenced this issue Jul 30, 2021
This change will allow us to remove the default link in a packetimpact test so
we can reduce indeterministic behaviors as required in https://fxbug.dev/78430.
This will also help with testing #1388.

Updates #578, #1388.

PiperOrigin-RevId: 385798010
copybara-service bot pushed a commit that referenced this issue Jul 30, 2021
This change will allow us to remove the default link in a packetimpact test so
we can reduce indeterministic behaviors as required in https://fxbug.dev/78430.
This will also help with testing #1388.

Updates #578, #1388.

PiperOrigin-RevId: 385798010
copybara-service bot pushed a commit that referenced this issue Jul 30, 2021
This change will allow us to remove the default link in a packetimpact test so
we can reduce indeterministic behaviors as required in https://fxbug.dev/78430.
This will also help with testing #1388.

Updates #578, #1388.

PiperOrigin-RevId: 385798010
copybara-service bot pushed a commit that referenced this issue Jul 30, 2021
This change will allow us to remove the default link in a packetimpact test so
we can reduce indeterministic behaviors as required in https://fxbug.dev/78430.
This will also help with testing #1388.

Updates #578, #1388.

PiperOrigin-RevId: 387896847
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: compatibility Issue related to (Linux) kernel compatibility area: networking Issue related to networking priority: p3 Low priority type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants