linux: Backport fixes for bpfilter and usermode helper to prevent iptable failures with "no child processes" #1495
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.
Under some circumstances which are not fully understood, the user mode helper process of the bpfilter module may fail. This causes applications that use iptables (notably Kubernetes kube-proxy and CNIs such as Calico) to not be able to view or change iptables. The error message received under such circumstances is:
Ways to reproduce:
Failure mode 1:
rmmod bpfilter
iptables
Failure mode 2:
bpfilter_umh
, e.g./proc/<pid>/fd/0
iptables
(this will break until the next reboot)In some failure modes, this can be worked around with
rmmod bpfilter
.The patches here make getsockopt, which is the syscall that iptables expects to succeed return successfully even if the usermode helper process is not working. Additionally, there are pre-requisite backports to improve the robustness of the bpfilter module.
When used together, neither of the failure modes are present.
Signed-off-by: Naadir Jeewa [email protected]