avoid wildcard for applying rp_filter to interfaces #1677
Merged
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.
Issue number:
Fixes #1367
Description of changes:
Stop using wildcards to apply
rp_filter = 2
in systemd, and set the previous default values foreth0
andlo
.This fixes Cilium, which wants to disable the reverse path filter checks for interfaces it creates. It's also more in line with our goals for the host OS, where we expect to manage
eth0
and other interfaces should be configured by containers or the orchestrator agent.Testing done:
For the aws-k8s-1.21 variant, all the settings in
/proc/sys/net/conf/ipv4/*/rp_filter
were the same before and after this change, and the same after a reboot. Interfaces created by the amazon-vpc-cni-k8s plugin hadrp_filter = 2
.For the aws-ecs-1 variant, all the settings in
/proc/sys/net/conf/ipv4/*/rp_filter
were the same before and after this change. Interfaces created for a task usingawsvpc
mode hadrp_filter = 2
. After a reboot, the interface was removed since the task was no longer running.For the vmware-k8s-1.20 variant, all the interfaces created by Cilium had
rp_filter = 0
, which is what it needs to function properly.eth0
andlo
still hadrp_filter = 2
. After a reboot, the Cilium interfaces were recreated, and still had the expected values.Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.