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

CONFIG_NFT_XFRM is not set #5171

Closed
hailfinger opened this issue Sep 10, 2022 · 5 comments
Closed

CONFIG_NFT_XFRM is not set #5171

hailfinger opened this issue Sep 10, 2022 · 5 comments

Comments

@hailfinger
Copy link
Contributor

hailfinger commented Sep 10, 2022

Describe the bug

The default kernel in Debian Bullseye has CONFIG_NFT_XFRM=m.
The kernel in Raspberry Pi OS has CONFIG_NFT_XFRM not set.

This causes the following error when using nftables rules with ipsec matches:

/etc/nftables.conf:52:17-29: Error: Could not process rule: No such file or directory
                ipsec out spi 1-65536 accept comment "VPN encapsulated traffic"
                ^^^^^^^^^^^^^

The same rule works fine in Debian.

Steps to reproduce the behaviour

Use the following content for /etc/nftables.conf:

table ip filter {
        chain output {
                type filter hook output priority 0; policy accept;

                ipsec out spi 1-65536 accept comment "VPN encapsulated traffic"
        }
}

Run
nft -f /etc/nftables.conf

Device (s)

Raspberry Pi 4 Mod. B

System

cat /etc/rpi-issue

Raspberry Pi reference 2022-09-06
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 827affcc11aaf7aa577d15daf02fb40b64392380, stage2

vcgencmd version

Aug 26 2022 14:04:10
Copyright (c) 2012 Broadcom
version 102f1e848393c2112206fadffaaf86db04e98326 (clean) (release) (start_x)

uname -a

Linux pi-test-cdh4 5.15.61-v8+ #1579 SMP PREEMPT Fri Aug 26 11:16:44 BST 2022 aarch64 GNU/Linux

Logs

No dmesg output for the bug.

Additional context

Having the same packet filtering features as the Debian Bullseye kernel would be highly appreciated. I'm using a few hundred Raspberry Pi 4B in a VPN deployment and I'd love to use nftables for packet filtering instead of relying on iptables to get the "will this traffic be sent via VPN" matching functionality.

Thank you!

pelwell added a commit that referenced this issue Sep 12, 2022
Enable the net_xfrm module to support using nftables rules with ipsec
matches,

See: #5171

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

pelwell commented Sep 12, 2022

Done - see e621efd.

@hailfinger
Copy link
Contributor Author

Thank you! Will test later today.

popcornmix added a commit to raspberrypi/firmware that referenced this issue Sep 12, 2022
kernel: configs: Add NET_XFRM=m
See: raspberrypi/linux#5171
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this issue Sep 12, 2022
kernel: configs: Add NET_XFRM=m
See: raspberrypi/linux#5171
@hailfinger
Copy link
Contributor Author

Tested, works.
Thank you!

@pelwell pelwell closed this as completed Sep 13, 2022
pelwell added a commit that referenced this issue Sep 13, 2022
Enable the net_xfrm module to support using nftables rules with ipsec
matches,

See: #5171

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
pelwell added a commit that referenced this issue Sep 13, 2022
Enable the net_xfrm module to support using nftables rules with ipsec
matches,

See: #5171

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

I noticed a typo in the changelog. It's CONFIG_NFT_XFRM, not CONFIG_NET_XFRM.
Probably only relevant for trees which get rebased (linux-6.0) as changing changelogs of already committed trees is a can of worms.

@pelwell
Copy link
Contributor

pelwell commented Sep 13, 2022

It's even less relevant for trees that get rebased because all the defconfig patches get squashed into one commit.

popcornmix pushed a commit that referenced this issue Sep 16, 2022
Enable the net_xfrm module to support using nftables rules with ipsec
matches,

See: #5171

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Sep 20, 2022
Enable the net_xfrm module to support using nftables rules with ipsec
matches,

See: #5171

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
herrnst pushed a commit to herrnst/linux-raspberrypi that referenced this issue Sep 20, 2022
Enable the net_xfrm module to support using nftables rules with ipsec
matches,

See: raspberrypi#5171

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Sep 26, 2022
Enable the net_xfrm module to support using nftables rules with ipsec
matches,

See: #5171

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Sep 26, 2022
Enable the net_xfrm module to support using nftables rules with ipsec
matches,

See: #5171

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
herrnst pushed a commit to herrnst/linux-raspberrypi that referenced this issue Sep 28, 2022
Enable the net_xfrm module to support using nftables rules with ipsec
matches,

See: raspberrypi#5171

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Oct 3, 2022
Enable the net_xfrm module to support using nftables rules with ipsec
matches,

See: #5171

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Oct 5, 2022
Enable the net_xfrm module to support using nftables rules with ipsec
matches,

See: #5171

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Oct 12, 2022
Enable the net_xfrm module to support using nftables rules with ipsec
matches,

See: #5171

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Oct 12, 2022
Enable the net_xfrm module to support using nftables rules with ipsec
matches,

See: #5171

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
herrnst pushed a commit to herrnst/linux-raspberrypi that referenced this issue Oct 12, 2022
Enable the net_xfrm module to support using nftables rules with ipsec
matches,

See: raspberrypi#5171

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
herrnst pushed a commit to herrnst/linux-raspberrypi that referenced this issue Oct 12, 2022
Enable the net_xfrm module to support using nftables rules with ipsec
matches,

See: raspberrypi#5171

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Oct 17, 2022
Enable the net_xfrm module to support using nftables rules with ipsec
matches,

See: #5171

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Oct 17, 2022
Enable the net_xfrm module to support using nftables rules with ipsec
matches,

See: #5171

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Oct 25, 2022
Enable the net_xfrm module to support using nftables rules with ipsec
matches,

See: #5171

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
lsahn-gh pushed a commit to lsahn-org/ubuntu-raspi that referenced this issue Jan 13, 2023
BugLink: https://bugs.launchpad.net/bugs/1989958

Enable the net_xfrm module to support using nftables rules with ipsec
matches,

See: raspberrypi/linux#5171

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

(cherry picked from commit ee455342735860687b542e3c0c8e629177544093 rpi-5.19.y)
Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.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

2 participants