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

Crash at startup of flannel when setting IPv6 masq rules #1968

Closed
dvergotes opened this issue May 10, 2024 · 2 comments
Closed

Crash at startup of flannel when setting IPv6 masq rules #1968

dvergotes opened this issue May 10, 2024 · 2 comments
Labels

Comments

@dvergotes
Copy link

Expected Behavior

No crash.

Current Behavior

Crash at startup.

I0510 12:10:22.653390       1 iptables.go:115] Current network or subnet (10.44.0.0/16, 10.44.3.0/24) is not equal to previous one (0.0.0.0/0, 0.0.0.0/0), trying to recycle old iptables rules
I0510 12:10:22.677499       1 iptables.go:125] Setting up masking rules
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x5aba7b]

goroutine 1 [running]:
math/big.(*Int).Cmp(0x0?, 0x1b9b2a3?)
	/usr/local/go/src/math/big/int.go:381 +0x1b
github.com/flannel-io/flannel/pkg/ip.IP6Net.Equal(...)
	/build/pkg/ip/ip6net.go:192
github.com/flannel-io/flannel/pkg/trafficmngr/iptables.(*IPTablesManager).SetupAndEnsureMasqRules(0xc0005a65d0, {0x1e31ff8, 0xc000487d60}, {0xa2c0000, 0x10}, {0x0, 0x0}, {0x0, 0x0}, {0xc0002e3500, ...}, ...)
	/build/pkg/trafficmngr/iptables/iptables.go:131 +0x438
main.main()
	/build/main.go:366 +0x13a3

The prevIPv6Network.IP variable is a null pointer.

Seems to be introduced by 2092b83

Possible Solution

Revert the commit that introduced the issue.

Steps to Reproduce (for bugs)

Deploy cluster as described in #1813

Your Environment

  • Flannel version: manual build with checkout of master branch (commit 6d18ae7)
  • Backend used (e.g. vxlan or udp): vxlan
  • Etcd version: rancher/hardened-etcd:v3.5.9-k3s1-build20230802
  • Kubernetes version (if used): v1.29.3+rke2r1
  • Operating System and version: Oracle Linux Server 8.9
@rbrtbnfgl
Copy link
Contributor

Thanks for reporting this. We'll add a fix for this before the next release.

@dvergotes
Copy link
Author

Thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants