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
sysctl.d: Add prefix 60 to baselayout.conf and set rp_filter values #13
Conversation
The baselayout.conf file was applied after all "[0-9]+.*.conf" files due to sorting by file name. This made it difficult for users to apply their configuration files because they had to use a name starting with something being sorted after "bb" while everybody expects "90" to be the latest in the order. This also caused that baselayout was overwriting the "50-default.conf" file from systemd. Sort the baselayout file after the "50-default.conf" file but before any possible user files like "90-...". By inserting the baselayout file after "50-default.conf" we have a good way to overwrite the systemd settings for rp_filter that we want to change to 0. This allows us to drop any patches to the systemd ebuild file.
The patches were not taking effect because they did not set net.ipv4.conf.default.rp_filter for new interfaces. Also, they got overwritten by the baselayout configuration which takes precedence and is the place for Flatcar-specific sysctl settings. The desired configuration was enfored there: flatcar/baselayout#13
Test results:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This differs from https://github.com/kinvolk/coreos-overlay/pull/746/files as it does not cover net.ipv4.conf.all.promote_secondaries
(which networkd relies on, see comment in https://github.com/kinvolk/coreos-overlay/pull/746/files#diff-17a2157c938f6228c6e37bb3b789d422a44442b0d50f8424f1629e7efa2607a9). Also, net.ipv4.conf.*.accept_source_route = 0
is not covered (see https://github.com/kinvolk/coreos-overlay/pull/746/files#diff-b8338bc6daaa469bac329ff335815017bcbcfd2640e4120de50d0021adbf5a09).
For |
The patches were not taking effect because they did not set net.ipv4.conf.default.rp_filter for new interfaces. Also, they got overwritten by the baselayout configuration which takes precedence and is the place for Flatcar-specific sysctl settings. The desired configuration was enfored there: flatcar/baselayout#13
The patches were not taking effect because they did not set net.ipv4.conf.default.rp_filter for new interfaces. Also, they got overwritten by the baselayout configuration which takes precedence and is the place for Flatcar-specific sysctl settings. The desired configuration was enfored there: flatcar/baselayout#13
The patches were not taking effect because they did not set net.ipv4.conf.default.rp_filter for new interfaces. Also, they got overwritten by the baselayout configuration which takes precedence and is the place for Flatcar-specific sysctl settings. The desired configuration was enfored there: flatcar/baselayout#13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for clarifying; LGTM then.
This pulls in flatcar/baselayout#13 to set sysctl rp_filter=0 and reorder how the configs are applied.
sysctl.d: Add prefix 60 to baselayout.conf and set rp_filter values
This pulls in flatcar/baselayout#13 to set sysctl rp_filter=0 and reorder how the configs are applied. A branch flatcar-2605-2705 is used as maitenance branch.
This pulls in flatcar/baselayout#13 to set sysctl rp_filter=0 and reorder how the configs are applied. A branch flatcar-2605-2705 is used as maintenance branch.
This pulls in flatcar/baselayout#13 to set sysctl rp_filter=0 and reorder how the configs are applied. A branch flatcar-2605-2705 is used as maintenance branch.
This pulls in flatcar/baselayout#13 to set sysctl rp_filter=0 and reorder how the configs are applied. A branch flatcar-2605-2705 is used as maintenance branch.
The baselayout.conf file was applied after all "[0-9]+.*.conf" files
due to sorting by file name. This made it difficult for users to apply
their configuration files because they had to use a name starting with
something being sorted after "bb" while everybody expects "90" to be
the latest in the order. This also caused that baselayout was
overwriting the "50-default.conf" file from systemd.
Sort the baselayout file after the "50-default.conf" file but before
any possible user files like "90-...". By inserting the baselayout file
after "50-default.conf" we have a good way to overwrite the systemd
settings for rp_filter that we want to change to 0. This allows us to
drop any patches to the systemd ebuild file.
Note: Pick for 2605 and 2705
How to use
Build an image and check that
sudo sysctl -a | grep '\.rp_filter'
reports= 0
for every line.Testing done
Done here