Re: netfilter: does the API break or something else ?

2020-05-14 Thread Xiubo Li

On 2020/5/14 18:54, Phil Sutter wrote:

Hi,

On Wed, May 13, 2020 at 11:20:35PM +0800, Xiubo Li wrote:

Recently I hit one netfilter issue, it seems the API breaks or something
else.

Just for the record, this was caused by a misconfigured kernel.


Yeah, thanks Phil for your help.

BRs

Xiubo



Cheers, Phil





Re: netfilter: does the API break or something else ?

2020-05-14 Thread Phil Sutter
Hi,

On Wed, May 13, 2020 at 11:20:35PM +0800, Xiubo Li wrote:
> Recently I hit one netfilter issue, it seems the API breaks or something 
> else.

Just for the record, this was caused by a misconfigured kernel.

Cheers, Phil


netfilter: does the API break or something else ?

2020-05-13 Thread Xiubo Li

Hi Experts,

Recently I hit one netfilter issue, it seems the API breaks or something 
else.


On CentOS8.1 with the recent upstream kernel built from source, such as 
5.6.0-rc6/5.7.0-rc4. When running the following command:

$ sudo bash -c 'iptables -A FORWARD -o enp3s0f1 -i ceph-brx -j ACCEPT'
iptables v1.8.2 (nf_tables): CHAIN_ADD failed (Operation not supported): 
chain INPUT


With the nftables command:

$ sudo nft add chain ip filter INPUT { type filter hook input priority 0\; }
Error: Could not process rule: Operation not supported
add chain ip filter INPUT { type filter hook input priority 0; }
^
$  sudo nft add chain ip filter FORWARD { type filter hook forward 
priority 0\; }

Error: Could not process rule: Operation not supported
add chain ip filter FORWARD { type filter hook forward priority 0; }
^
$  sudo nft add chain ip filter OUTPUT { type filter hook output 
priority 0\; }

Error: Could not process rule: Operation not supported
add chain ip filter OUTPUT { type filter hook output priority 0; }
^^^


While tried them with downstream kernel 4.18.0-147.8.1.el8_1.x86_64, 
they all could work well.


The nftables/libnftnl packages are:

$ rpm -qa|grep nft
nftables-0.9.0-14.el8.x86_64
libnftnl-1.1.1-4.el8.x86_64

And we have tried v5.7.0-rc4+ with f31 userspace, they all could work 
well too.


From above I just suspect the API should break. Could someone kindly 
point out which and where ?

Thanks
BRs
Xiubo