Limited bridge netfilter application.
Fixes moby/moby#47127.
Please sign your commits following these rules: https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work The easiest way to do this is to amend the last commit:
$ git clone -b "limited-bridge-netfilter" [email protected]:tomkcook/libnetwork.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -f
Amending updates the existing PR. You DO NOT need to open a new one.
Thanks for raising a PR @tomkcook Can you please
- Sign your PR using the steps mentioned above
- Elaborate what you did, and why you did it in the commit message (by sharing the links you had shared in the Issue)
Thanks for raising a PR @tomkcook Can you please
1. Sign your PR using the steps mentioned above 2. Elaborate what you did, and why you did it in the commit message (by sharing the links you had shared in the Issue)
Done.
these changes look good @tomkcook we might need to remove the check you brought up earlier https://github.com/docker/libnetwork/issues/2488#issuecomment-571746499 thoughts ? @euanh @selansen @thaJeztah
we might need to remove the check you brought up earlier moby/moby#47127 (comment)
Would that remove the --icc=false option entirely?
@thaJeztah no, only suggesting we rewrite it to
{d.config.EnableIPTables, setupBridgeNetFiltering},)
Unrelated to this PR directly, but I noticed that the i argument to checkBridgeNetFiltering() doesn't seem to be used;
func checkBridgeNetFiltering(config *networkConfiguration, i *bridgeInterface) error {
It was added in https://github.com/docker/libnetwork/pull/336/files, and looks to be because it needs to satisfy the setupStep interface; https://github.com/docker/libnetwork/blob/9f2286349b58b00cf98bd36aa3f78763d52e8c63/drivers/bridge/setup.go#L3 and passed a value during the setup; https://github.com/docker/libnetwork/blob/9f2286349b58b00cf98bd36aa3f78763d52e8c63/drivers/bridge/setup.go#L15-L22
(could probably be changed to _ *bridgeInterface to make it more explicit that it's unused)
@tomkcook can incorporate https://github.com/docker/libnetwork/issues/2488#issuecomment-571746499 (remove the icc check) in this PR
Note we have migrated this codebase over to github.com/moby/moby/libnetwork. We are not accepting PR's on this repo anymore except for backports to be included in moby 20.10