Commit 42e344f
netfilter: nf_tables: Fix for deleting base chains with payload
When deleting a base chain, iptables-nft simply submits the whole chain
to the kernel, including the NFTA_CHAIN_HOOK attribute. The new code
added by fixed commit then turned this into a chain update, destroying
the hook but not the chain itself. Detect the situation by checking if
the chain type is either netdev or inet/ingress.
Fixes: 7d937b1 ("netfilter: nf_tables: support for deleting devices in an existing netdev chain")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>1 parent 62f9a68 commit 42e344f
1 file changed
Lines changed: 9 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2811 | 2811 | | |
2812 | 2812 | | |
2813 | 2813 | | |
2814 | | - | |
| 2814 | + | |
| 2815 | + | |
2815 | 2816 | | |
2816 | 2817 | | |
| 2818 | + | |
2817 | 2819 | | |
2818 | 2820 | | |
2819 | | - | |
2820 | 2821 | | |
2821 | 2822 | | |
2822 | 2823 | | |
2823 | 2824 | | |
2824 | 2825 | | |
2825 | | - | |
2826 | | - | |
2827 | | - | |
2828 | | - | |
2829 | 2826 | | |
2830 | 2827 | | |
2831 | 2828 | | |
| |||
2910 | 2907 | | |
2911 | 2908 | | |
2912 | 2909 | | |
2913 | | - | |
| 2910 | + | |
| 2911 | + | |
| 2912 | + | |
| 2913 | + | |
| 2914 | + | |
| 2915 | + | |
2914 | 2916 | | |
2915 | 2917 | | |
2916 | 2918 | | |
| |||
0 commit comments