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

avoid wildcard for applying rp_filter to interfaces #1677

Merged
merged 2 commits into from
Aug 2, 2021

Conversation

bcressey
Copy link
Contributor

Issue number:
Fixes #1367

Description of changes:
Stop using wildcards to apply rp_filter = 2 in systemd, and set the previous default values for eth0 and lo.

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 had rp_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 using awsvpc mode had rp_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 and lo still had rp_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.

bcressey added 2 commits July 29, 2021 16:38
This interferes with the operation of CNI plugins such as Cilium.

Signed-off-by: Ben Cressey <bcressey@amazon.com>
These values are no longer applied by the systemd sysctl snippet, so
we apply them here instead.

Signed-off-by: Ben Cressey <bcressey@amazon.com>
@bcressey bcressey merged commit f961180 into bottlerocket-os:develop Aug 2, 2021
@bcressey bcressey deleted the rp-filter branch May 16, 2022 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cilium Cluster Scope Support
4 participants