Skip to content
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

nftables kernel modules missing #3615

Open
steveharriss opened this issue May 15, 2020 · 7 comments
Open

nftables kernel modules missing #3615

steveharriss opened this issue May 15, 2020 · 7 comments

Comments

@steveharriss
Copy link

Errors on running nft as kernel modules are missing from:
/lib/modules/5.4.40-v7l+/kernel/net/netfilter

Missing nf_tables.ko and all relevant nft_*.ko files

sudo apt install nftables
nftables v0.9.0 (Fearless Fosdick)
nftables.service loaded failed failed nftables

If you delete the minimal nftables.conf file you can start the service
systemctl status nftables
● nftables.service - nftables
Loaded: loaded (/lib/systemd/system/nftables.service; enabled; vendor preset: enabled)
Active: active (exited) since Fri 2020-05-15 15:50:03 BST; 1min 40s ago
Docs: man:nft(8)
http://wiki.nftables.org
Process: 1986 ExecStart=/usr/sbin/nft -f /etc/nftables.conf (code=exited, status=0/SUCCESS)
Main PID: 1986 (code=exited, status=0/SUCCESS)

May 15 15:50:03 raspberrypi systemd[1]: Starting nftables...
May 15 15:50:03 raspberrypi systemd[1]: Started nftables.

But with anything in .conf file service fails with errors:
/etc/nftables.conf:2:1-14: Error: Could not process rule: Operation not supported flush ruleset

Same for running nft in an interactive session

Linux raspberrypi 5.4.40-v7l+ #1316 SMP Tue May 12 13:10:42 BST 2020 armv7l GNU/Linux
pi4 4Gb Ram
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 5f884374b6ac6e155330c58caa1fb7249b8badf1, stage4
version 21bfdeee3a6ea823e2113b983390acd1eec8edfb (clean) (release) (start)

pelwell added a commit that referenced this issue May 15, 2020
The arm bcm2711_defconfig and the arm64 bcmrpi3_defconfig have been
missing their NF_TABLES settings. Restore them.

See: #3615

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
@pelwell
Copy link
Contributor

pelwell commented May 15, 2020

They do indeed appear to be missing from the 32-bit bcm2711_defconfig and the 64-bit bcmrpi3_defconfig. The squashing that takes place on our new branches makes it hard to work out what went wrong, but I suspect there was a merge problem and it ended up half-and-half.

That's fixed in the rpi-5.4.y branch of the kernel source, and the modules will appear in future releases.

pelwell added a commit that referenced this issue May 18, 2020
The arm bcm2711_defconfig and the arm64 bcmrpi3_defconfig have been
missing their NF_TABLES settings. Restore them.

See: #3615

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix added a commit to raspberrypi/firmware that referenced this issue May 20, 2020
See: raspberrypi/linux#3626

kernel: VC4 DRM/KMS - use correct dma-ranges
See: raspberrypi/linux#3623

kernel: media: bcm2835-unicam: Retain packing information on G_FMT
See: raspberrypi/linux#3622

kernel: Switch to snd_soc_dai_set_bclk_ratio
See: raspberrypi/linux#3620

kernel: V4L2 H264 framing fixes
See: raspberrypi/linux#3614

kernel: drm/vc4: Fix VIC usage with Broadcast RGB
See: raspberrypi/linux#3611

kernel: media: bcm2835-unicam: Always service interrupts
See: raspberrypi/linux#3608

kernel: overlays: Fix audio parameter of vc4-kms-v3
See: raspberrypi/linux#2489

kernel: configs: Restore missing NF_TABLES settings
See: raspberrypi/linux#3615

kernel: sc16is7xx: Fix for hardware flow control
See: raspberrypi/linux#2542

kernel: Use the upstream cpufreq driver on non-BCM2835 Pis
See: raspberrypi/linux#3604

kernel: Backport of udmabuf and dma-heaps
See: raspberrypi/linux#3571

kernel: imx477 v4l2 driver
See: raspberrypi/linux#3605

firmware: isp: fix ISP component to return non-zero focus FoMs

firmware: Fix for IMX477 focal length, f_number and aperture

firmware: Update firmware for USB MSD boot

firmware: platform: Fix overflow on high arm overclocks

firmware: video_encode: Add option to include header bytes with frame

firmware: DSI display: Close I2C handle if the display doesn't probe

firmware: mmal/vc: Add mapping for OMX_IndexConfigBufferStall / MMAL_PARAMETER_VIDEO_STALL_THRESHOLD
See: https://www.raspberrypi.org/forums/viewtopic.php?f=70&t=273123&p=1655481

firmware: hdmi: Request an I2C interrupt for EDID reading

firmware: i2c: Move using_interrupt flag into periph_setup
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this issue May 20, 2020
See: raspberrypi/linux#3626

kernel: VC4 DRM/KMS - use correct dma-ranges
See: raspberrypi/linux#3623

kernel: media: bcm2835-unicam: Retain packing information on G_FMT
See: raspberrypi/linux#3622

kernel: Switch to snd_soc_dai_set_bclk_ratio
See: raspberrypi/linux#3620

kernel: V4L2 H264 framing fixes
See: raspberrypi/linux#3614

kernel: drm/vc4: Fix VIC usage with Broadcast RGB
See: raspberrypi/linux#3611

kernel: media: bcm2835-unicam: Always service interrupts
See: raspberrypi/linux#3608

kernel: overlays: Fix audio parameter of vc4-kms-v3
See: raspberrypi/linux#2489

kernel: configs: Restore missing NF_TABLES settings
See: raspberrypi/linux#3615

kernel: sc16is7xx: Fix for hardware flow control
See: raspberrypi/linux#2542

kernel: Use the upstream cpufreq driver on non-BCM2835 Pis
See: raspberrypi/linux#3604

kernel: Backport of udmabuf and dma-heaps
See: raspberrypi/linux#3571

kernel: imx477 v4l2 driver
See: raspberrypi/linux#3605

firmware: isp: fix ISP component to return non-zero focus FoMs

firmware: Fix for IMX477 focal length, f_number and aperture

firmware: Update firmware for USB MSD boot

firmware: platform: Fix overflow on high arm overclocks

firmware: video_encode: Add option to include header bytes with frame

firmware: DSI display: Close I2C handle if the display doesn't probe

firmware: mmal/vc: Add mapping for OMX_IndexConfigBufferStall / MMAL_PARAMETER_VIDEO_STALL_THRESHOLD
See: https://www.raspberrypi.org/forums/viewtopic.php?f=70&t=273123&p=1655481

firmware: hdmi: Request an I2C interrupt for EDID reading

firmware: i2c: Move using_interrupt flag into periph_setup
popcornmix pushed a commit that referenced this issue May 20, 2020
The arm bcm2711_defconfig and the arm64 bcmrpi3_defconfig have been
missing their NF_TABLES settings. Restore them.

See: #3615

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue May 20, 2020
The arm bcm2711_defconfig and the arm64 bcmrpi3_defconfig have been
missing their NF_TABLES settings. Restore them.

See: #3615

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Jun 3, 2020
The arm bcm2711_defconfig and the arm64 bcmrpi3_defconfig have been
missing their NF_TABLES settings. Restore them.

See: #3615

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Jun 3, 2020
The arm bcm2711_defconfig and the arm64 bcmrpi3_defconfig have been
missing their NF_TABLES settings. Restore them.

See: #3615

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
jpuhlman pushed a commit to MontaVista-OpenSourceTechnology/linux-mvista that referenced this issue Jun 8, 2020
Source: kernel.org
MR: 103889
Type: Enhancement
Disposition: Merged from https://github.com/raspberrypi/linux.git rpi-5.4.y
ChangeID: 2b3d8b5cfbca0ee710141923751076fe4dd0b6d7
Description:

The arm bcm2711_defconfig and the arm64 bcmrpi3_defconfig have been
missing their NF_TABLES settings. Restore them.

See: raspberrypi/linux#3615

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
popcornmix pushed a commit that referenced this issue Jun 10, 2020
The arm bcm2711_defconfig and the arm64 bcmrpi3_defconfig have been
missing their NF_TABLES settings. Restore them.

See: #3615

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Jun 10, 2020
The arm bcm2711_defconfig and the arm64 bcmrpi3_defconfig have been
missing their NF_TABLES settings. Restore them.

See: #3615

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Jun 17, 2020
The arm bcm2711_defconfig and the arm64 bcmrpi3_defconfig have been
missing their NF_TABLES settings. Restore them.

See: #3615

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Jun 17, 2020
The arm bcm2711_defconfig and the arm64 bcmrpi3_defconfig have been
missing their NF_TABLES settings. Restore them.

See: #3615

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Jun 26, 2020
The arm bcm2711_defconfig and the arm64 bcmrpi3_defconfig have been
missing their NF_TABLES settings. Restore them.

See: #3615

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Jul 1, 2020
The arm bcm2711_defconfig and the arm64 bcmrpi3_defconfig have been
missing their NF_TABLES settings. Restore them.

See: #3615

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Jul 13, 2020
The arm bcm2711_defconfig and the arm64 bcmrpi3_defconfig have been
missing their NF_TABLES settings. Restore them.

See: #3615

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
@mys721tx
Copy link

nftables on aarch64 does not support sets at 08ae2dd with the following minimal nftables.conf.

#!/usr/bin/nft -f

define IP_DROPS = {
    172.16.0.0/24
}

table inet filter {
    chain input {
        type filter hook input priority 0; policy accept;

        ip saddr $IP_DROPS drop
    }
}

@mys721tx
Copy link

Also the output from nft:

$ sudo nft flush ruleset; sudo nft -f /etc/nftables.conf
/etc/nftables.conf:3:19-1: Error: Could not process rule: Operation not supported
define IP_DROPS = {
 
/etc/nftables.conf:3:19-1: Error: Could not process rule: No such file or directory
define IP_DROPS = {
 
/etc/nftables.conf:11:9-31: Error: Could not process rule: No such file or directory
        ip saddr $IP_DROPS drop
        ^^^^^^^^^^^^^^^^^^^^^^^

@mys721tx
Copy link

The problem is resolved at 9007908.

@popcornmix
Copy link
Collaborator

@steveharriss are you happy this issue is resolved?

@ghost
Copy link

ghost commented May 10, 2021

Hello, this issue appears related to my issue.

Therefore may I humbly suggest that this issue is not resolved. Please advise whether I should I raise a new issue if not.

It appears a further module NF_LOG_ARP is missing from the netfilter .kconfig and presumably some files that go with it.

Kernel:
root@laptop:/lib/modules/5.10.27-v8+/kernel/net/netfilter# uname -a
Linux laptop 5.10.27-v8+ #1409 SMP PREEMPT Tue Apr 6 18:29:13 BST 2021 aarch64 GNU/Linux

For reference, the netfilter team has suggested the fix here: https://bugzilla.netfilter.org/show_bug.cgi?id=1521

Thanks

pelwell added a commit that referenced this issue May 10, 2021
See: #3615

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
@pelwell
Copy link
Contributor

pelwell commented May 10, 2021

I'm happy to add NF_LOG_ARP=m (and NF_LOG_NETDEV=m - another missing option in that category) - see ad26fd4.

pelwell added a commit that referenced this issue May 12, 2021
See: #3615

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
pelwell added a commit that referenced this issue May 12, 2021
See: #3615

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue May 13, 2021
See: #3615

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue May 13, 2021
See: #3615

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix added a commit to raspberrypi/firmware that referenced this issue May 13, 2021
kernel: i2c0 dtoverlay fixes
See: raspberrypi/linux#4342

kernel: Ov5647 fixes
See: raspberrypi/linux#4335

kernel: configs: Add NF_LOG_ARP=m and NF_LOG_NETDEV=m
See: raspberrypi/linux#3615

kernel: Remove spi override from merus-amp overlay
See: raspberrypi/linux#4242
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this issue May 13, 2021
kernel: i2c0 dtoverlay fixes
See: raspberrypi/linux#4342

kernel: Ov5647 fixes
See: raspberrypi/linux#4335

kernel: configs: Add NF_LOG_ARP=m and NF_LOG_NETDEV=m
See: raspberrypi/linux#3615

kernel: Remove spi override from merus-amp overlay
See: raspberrypi/linux#4242
popcornmix pushed a commit that referenced this issue May 19, 2021
See: #3615

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue May 19, 2021
See: #3615

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue May 25, 2021
See: #3615

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Jun 8, 2021
See: #3615

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Jun 14, 2021
See: #3615

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
limeng-linux pushed a commit to limeng-linux/linux-yocto-develop that referenced this issue Jun 27, 2021
commit  7f185d2a737a961c063449652c35b618dc95672b from
https://github.com/raspberrypi/linux.git rpi-5.12.y

See: raspberrypi/linux#3615

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Signed-off-by: Meng Li <Meng.Li@windriver.com>
popcornmix pushed a commit that referenced this issue Jul 9, 2021
See: #3615

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Jul 15, 2021
See: #3615

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Jul 27, 2021
See: #3615

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Noltari pushed a commit to Noltari/rpi-linux that referenced this issue Aug 20, 2021
See: raspberrypi#3615

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants