datapath,daemon: Fix initialization panics when IPv6 is enabled#12197
Merged
datapath,daemon: Fix initialization panics when IPv6 is enabled#12197
Conversation
Previously, if IPv{4,6} global scope addrs could have not been derived
for BPF NodePort, the agent had logged an error and panicked.
In v1.8, we extended the device detection to include devices with k8s
InternalIP/ExternalIP addrs. The detection does not check a scope of
those addrs. So, it is possible that an upgrade to v1.8 might break
for users with --enable-ipv6=true and --kube-proxy-replacement=probe.
To avoid that, for now just disable BPF NodePort and friends if no
global scope addr can be detected. In the future, we should revisit
whether it makes sense to consider local scope addrs for IPv6 too.
Reported-by: Jed Salazar <jed@isovalent.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Martynas Pumputis <m@lambda.lt>
Otherwise, cilium-agent will panic when --enable-ipv6=true with the
following:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1b17ec7]
[...]
/go/src/github.com/cilium/cilium/pkg/datapath/linux/config/config.go:344 +0x31d7
Fixes: a562b74 ("bpf: Check native-routing-cidr in BPF masquerade")
Reported-by: Robin Hahling <robin.hahling@gw-computing.net>
Signed-off-by: Martynas Pumputis <m@lambda.lt>
Member
Author
|
test-me-please |
borkmann
approved these changes
Jun 19, 2020
aanm
requested changes
Jun 19, 2020
aanm
approved these changes
Jun 19, 2020
Member
|
provision fail on net-next suite: |
Member
|
retest-net-next |
rolinh
approved these changes
Jun 19, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes two panics mentioned in #12188 (see commit msgs).
Fix #12188