Skip to contentSkip to conversation

files: Move netdev-ingress.nft to /etc/nftables as well

PATCH Applied Phil Sutter 3 participants 8 messages Jun 24, 2019 – Jul 3, 2019 netfilter

lore
Share & tools
lore

Phil Sutter

author reviewer
#0 lore raw

PATCH 1/1 files: Move netdev-ingress.nft to /etc/nftables as well

Commit 13535a3b40b62 ("files: restore base table skeletons") moved config skeletons back from examples/ to /etc/nftables/ directory, but ignored the fact that commit 6c9230e79339c ("nftables: rearrange files and examples") added a new file 'netdev-ingress.nft' which is referenced from 'all-in-one.nft' as well.

Fixes 13535a3b40b62 ("files: restore base table skeletons")
---
 files/nftables/Makefile.am                      | 3 ++-
 files/{examples => nftables}/netdev-ingress.nft | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
 rename files/{examples => nftables}/netdev-ingress.nft (87%)
files/nftables/Makefile.am +2 -1
index f18156d844e5c..a93b7978f62d4 100644
@@ -10,7 +10,8 @@ dist_pkgsysconf_DATA =	all-in-one.nft		\
 			ipv6-filter.nft		\
 			ipv6-mangle.nft		\
 			ipv6-nat.nft		\
-			ipv6-raw.nft
+			ipv6-raw.nft		\
+			netdev-ingress.nft
 
 install-data-hook:
 	${SED} -i 's|@sbindir[@]|${sbindir}/|g' ${DESTDIR}${pkgsysconfdir}/*.nft
files/nftables/netdev-ingress.nft renamed from files/examples/netdev-ingress.nft +1 -1
similarity index 87%
rename from files/examples/netdev-ingress.nft
rename to files/nftables/netdev-ingress.nft
index 2585d15493885..9e46b15a7e596 100755
@@ -1,4 +1,4 @@
-#!/usr/sbin/nft -f
+#!@sbindir@nft -f
 
 # mind the NIC, it must exists
 table netdev filter {
Signature · 1 line
2.21.0
maintainer
#1 lore raw
Quoted 5 lines · Phil Sutter

Commit 13535a3b40b62 ("files: restore base table skeletons") moved config skeletons back from examples/ to /etc/nftables/ directory, but ignored the fact that commit 6c9230e79339c ("nftables: rearrange files and examples") added a new file 'netdev-ingress.nft' which is referenced from 'all-in-one.nft' as well.

Right. Do you think we should also add in inet-nat.nft example, or even replace the ipvX- ones?

author reviewer
#2 lore raw

Hi Florian,

Quoted 9 lines · Florian Westphal
Quoted 5 lines · Phil Sutter

Commit 13535a3b40b62 ("files: restore base table skeletons") moved config skeletons back from examples/ to /etc/nftables/ directory, but ignored the fact that commit 6c9230e79339c ("nftables: rearrange files and examples") added a new file 'netdev-ingress.nft' which is referenced from 'all-in-one.nft' as well.

Right. Do you think we should also add in inet-nat.nft example, or even replace the ipvX- ones?

Having an inet family nat example would be wonderful! Can inet NAT replace IPvX-ones completely or are there any limitations as to what is possible in rules?

Cheers, Phil

maintainer
#3 lore raw
Quoted 6 lines · Phil Sutter
Quoted 2 lines

Right. Do you think we should also add in inet-nat.nft example, or even replace the ipvX- ones?

Having an inet family nat example would be wonderful! Can inet NAT replace IPvX-ones completely or are there any limitations as to what is possible in rules?

I'm not aware of any limitations.

#4 lore raw
Quoted 9 lines · Florian Westphal
Quoted 6 lines · Phil Sutter
Quoted 2 lines

Right. Do you think we should also add in inet-nat.nft example, or even replace the ipvX- ones?

Having an inet family nat example would be wonderful! Can inet NAT replace IPvX-ones completely or are there any limitations as to what is possible in rules?

I'm not aware of any limitations.

Only limitation is that older kernels do not support NAT for the inet family.

author reviewer
#5 lore raw
Quoted 5 lines · Pablo Neira Ayuso
Quoted 4 lines · Florian Westphal
Quoted 3 lines · Phil Sutter
Quoted 2 lines

Right. Do you think we should also add in inet-nat.nft example, or even replace the ipvX- ones?

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Having an inet family nat example would be wonderful! Can inet NAT replace IPvX-ones completely or are there any limitations as to what is possible in rules?

I'm not aware of any limitations.

Only limitation is that older kernels do not support NAT for the inet family.

OK, so maybe add inet NAT example but not delete ip/ip6 ones?

What is the status regarding my patch, please? I think fixing netdev-ingress.nft location is unrelated to this discussion, right?

Cheers, Phil

#6 lore raw
Quoted 10 lines · Phil Sutter
Quoted 9 lines · Pablo Neira Ayuso
Quoted 8 lines · Florian Westphal
Quoted 6 lines · Phil Sutter
Quoted 2 lines

Right. Do you think we should also add in inet-nat.nft example, or even replace the ipvX- ones?

Having an inet family nat example would be wonderful! Can inet NAT replace IPvX-ones completely or are there any limitations as to what is possible in rules?

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

I'm not aware of any limitations.

Only limitation is that older kernels do not support NAT for the inet family.

OK, so maybe add inet NAT example but not delete ip/ip6 ones?

Agreed.

Quoted 2 lines

What is the status regarding my patch, please? I think fixing netdev-ingress.nft location is unrelated to this discussion, right?

Oh right, I got confused by the discussion.

maintainer Applied
#7 lore raw
In reply to Phil Sutter
Quoted 5 lines · Phil Sutter

Commit 13535a3b40b62 ("files: restore base table skeletons") moved config skeletons back from examples/ to /etc/nftables/ directory, but ignored the fact that commit 6c9230e79339c ("nftables: rearrange files and examples") added a new file 'netdev-ingress.nft' which is referenced from 'all-in-one.nft' as well.

Applied, thanks.