Skip to content

[27.x backport] Fix br_netfilter module loading logic#48966

Merged
thaJeztah merged 1 commit intomoby:27.xfrom
thaJeztah:27.x_backport_br_net-fix
Nov 27, 2024
Merged

[27.x backport] Fix br_netfilter module loading logic#48966
thaJeztah merged 1 commit intomoby:27.xfrom
thaJeztah:27.x_backport_br_net-fix

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah commented Nov 27, 2024


Checking for /proc/sys/net/bridge directory alone is not enough to decide if bridge, br_netfilter module to be loaded. Check for specific file for each bridge & br_netfilter module and then do modprobe if the file is not found in /proc/sys/net/bridge

- What I did
Fix loading of bridge and br_netfilter kernel modules

- How I did it
By check for presence of specific files for each module in procfs

- How to verify it

systemctl restart docker
lsmod | grep br_netfilter

- Description for the changelog

Fix loading of `bridge` and `br_netfilter` kernel modules.

- A picture of a cute animal (not mandatory but encouraged)

Checking for `/proc/sys/net/bridge` directory alone is not enough to
decide if bridge, br_netfilter module to be loaded.
Check for specific file for br_netfilter module and then
do modprobe if the file is not found under `/proc/sys/net/bridge`

Loading br_netfilter implicitly loads bridge module.

fixes: moby#48948

Signed-off-by: Shreenidhi Shedi <[email protected]>
(cherry picked from commit 264c15b)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Copy link
Copy Markdown
Contributor

@robmry robmry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah
Copy link
Copy Markdown
Member Author

Failure is unrelated and a known flaky;

=== RUN   TestDiff
    diff_test.go:28: assertion failed: 
        --- expected
        +++ items
          []container.FilesystemChange(
        - 	{{Kind: s"A", Path: "/foo"}, {Kind: s"A", Path: "/foo/bar"}},
        + 	nil,
          )

@thaJeztah thaJeztah merged commit 7f7efed into moby:27.x Nov 27, 2024
@thaJeztah thaJeztah deleted the 27.x_backport_br_net-fix branch November 27, 2024 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants