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

🐛 BUG: use_system_route_table not considering multipath routes #1175

Open
dioss-Machiel opened this issue Jul 9, 2024 · 1 comment
Open

Comments

@dioss-Machiel
Copy link

What version of nebula are you using? (nebula -version)

1.9.3

What operating system are you using?

Linux

Describe the Bug

When setting use_system_route_table: true nebula tracks route changes. The nebula code checks if the route is a "gateway route" before considering adding the route

nebula/overlay/tun_linux.go

Lines 495 to 500 in e6009b8

func (t *tun) updateRoutes(r netlink.RouteUpdate) {
if r.Gw == nil {
// Not a gateway route, ignore
t.l.WithField("route", r).Debug("Ignoring route update, not a gateway route")
return
}

However, this does not work when adding a multipath route, in that case you get this in the logs:
level=debug msg="Ignoring route update, not a gateway route" route="{Dst: 10.152.22.107/32 Src: 10.154.0.13 Gw: [{Ifindex: 4 Weight: 1 Gw: 10.158.255.252 Flags: [onlink]} {Ifindex: 13 Weight: 1 Gw: 10.159.0.1 Flags: []}] Flags: [] Table: 254 Realm: 0}"

Formatted:

{
	Dst: 10.152.22.107/32 Src: 10.154.0.13 Gw: 
	[
		{Ifindex: 4 Weight: 1 Gw: 10.158.255.252 Flags: [onlink]} 
		{Ifindex: 13 Weight: 1 Gw: 10.159.0.1 Flags: []}
	]
}

When adding multipath routes the "GW" field is empty, instead the gateways in the multipath route config should be checked.

Logs from affected hosts

level=debug msg="Ignoring route update, not a gateway route" route="{Dst: 10.152.22.107/32 Src: 10.154.0.13 Gw: [{Ifindex: 4 Weight: 1 Gw: 10.158.255.252 Flags: [onlink]} {Ifindex: 13 Weight: 1 Gw: 10.159.0.1 Flags: []}] Flags: [] Table: 254 Realm: 0}"   

Config files from affected hosts

tun:
  disabled: false
  drop_local_broadcast: true
  drop_multicast: true
  mtu: 1300
  tx_queue: 500
  use_system_route_table: true

@wadey
Copy link
Member

wadey commented Jul 9, 2024

Please also see #1012 where we tried to add support for this, but it is more complicated than it appears.

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

2 participants