fix: check either ip_tables or nf_tables - #577
Conversation
| # https://github.com/moby/moby/blob/master/contrib/dockerd-rootless-setuptool.sh | ||
| # uses the same logic | ||
| iptables_module="nf_tables" | ||
| if [ -z "$SKIP_IPTABLES" ] && command -v iptables >/dev/null 2>&1 && iptables --version | grep -q "legacy"; then |
There was a problem hiding this comment.
We should probably also include sbin too when executing iptables
Like the Moby script does: https://github.com/moby/moby/blob/e70ce7a35b94b0915dae5ba356a69d07ded2fd46/contrib/dockerd-rootless-setuptool.sh#L145-L154
There was a problem hiding this comment.
In that case we can make the existing code a bit cleaner while we are at it too by making a iptables_command variable just like moby
| # modules, it just outputs what it was compiled for | ||
| # we do not check further to avoid complex logic | ||
| # | ||
| # https://github.com/moby/moby/blob/master/contrib/dockerd-rootless-setuptool.sh |
There was a problem hiding this comment.
Probably good to include a digested permalink instead of floating master branch reference
There was a problem hiding this comment.
I did not know what that was until just now. I guess we learn something new everyday
|
Oh one last thing - can you squash your commits into one? |
Some systems use nf_tables instead of ip_tables in which case ip_tables may not be loaded. Only one of ip_tables or nf_tables is checked based on the output of `iptables --version` Signed-off-by: ankumeah <ankitku00ish@gmail.com>
869bcc7 to
5d73bed
Compare
Sure |
Some systems use nf_tables instead of ip_tables in which case ip_tables may not be loaded.
Only one of ip_tables or nf_tables is checked
based on the output of
iptables --versioncloses #576
What I did
Made
rootless-install.shcompatible with systems that use nf_tables instead of ip_tablesHow I did it
iptables --versionis ran to check if host system is using ip_tables or nf_tables and only the used module is checkedHow to verify it
rootless-install.shDescription for the changelog
fixed rootless installation with nf_tables
A picture of a cute animal
Say hi to Bagel (my friend's dog)!