mirror of
https://github.com/moby/moby.git
synced 2026-07-12 02:25:19 +00:00
These functions were mostly identical, except for iptables being enabled by default (unless explicitly disabled by config). Rewrite the function to a enabledIptablesVersions, which returns the list of iptables-versions that are enabled for the controller. This prevents having to acquire a lock twice, and simplifies arrangeUserFilterRule, which can now just iterate over the enabled versions. Also moving this function to a linux-only file, as other platforms don't have the iptables types defined. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
955 B
955 B