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

Don't delete the routes which are added for the peer IPv6 gateways #3369

Closed
Jexf opened this issue Feb 28, 2022 · 0 comments · Fixed by #3336
Closed

Don't delete the routes which are added for the peer IPv6 gateways #3369

Jexf opened this issue Feb 28, 2022 · 0 comments · Fixed by #3336
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@Jexf
Copy link
Member

Jexf commented Feb 28, 2022

Describe the bug

"on-link" is not identified in IPv6 route entries, the peer IPv6 gateways need to add into IPv6 routes separately. But the related routes will be removed in init node routes process when Antrea Agent starting, then sync again.

I0228 02:10:02.574234       1 route_linux.go:730] Deleting unknown route {Ifindex: 7 Dst: fc00::1/128 Src: <nil> Gw: <nil> Flags: [] Table: 254}
I0228 02:10:02.574432       1 route_linux.go:730] Deleting unknown route {Ifindex: 7 Dst: fc00:0:0:2::1/128 Src: <nil> Gw: <nil> Flags: [] Table: 254}
I0228 02:10:02.574900       1 node_route_controller.go:546] "Adding route and flow to Node" Node="tos-04" podCIDR="fc00::/64" peerNodeIP="2003:ac18::30a:15"
I0228 02:10:02.575073       1 node_route_controller.go:546] "Adding route and flow to Node" Node="tos-06" podCIDR="fc00:0:0:2::/64" peerNodeIP="2003:ac18::30a:17"

Add peer IPv6 gateways routes logic:

		if podCIDR.IP.To4() == nil {
			// "on-link" is not identified in IPv6 route entries, so split the configuration into 2 entries.
			routes = []*netlink.Route{
				{
					Dst:       &net.IPNet{IP: nodeGwIP, Mask: net.IPMask{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}},
					LinkIndex: c.nodeConfig.GatewayConfig.LinkIndex,
				},
			}
		} else {
			route.Flags = int(netlink.FLAG_ONLINK)
		}

To Reproduce
1.Use dual-stack with Antrea
2.Restart Antrea Agent

Expected
Just remove the dirty routes, and the routes which have been added for peer IPv6 gateways need to be reserved

Actual behavior

Remove the related routes, then add again.

Versions:
Antrea 1.5.0

@Jexf Jexf added the kind/bug Categorizes issue or PR as related to a bug. label Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant