Re: [PATCH] netfilter: Only call ftp alg when needed

2018-11-20 Thread Jason Rippon
Is there anything more you need from me? I have tested this with old Kernel releases, as well as Net-next and the FTP alg does not seem to respect the masquerade --to-ports option. e.g echo 1 > /proc/sys/net/netfilter/nf_conntrack_helper iptables -t nat -I POSTROUTING -o enp0 -j MASQUERADE -p

Re: [PATCH iptables] include: fix build with kernel headers before 4.2

2018-11-20 Thread Florian Westphal
Baruch Siach wrote: > Pablo Neira Ayuso writes: > >> > This is updating a cached copy of the kernel headers, we basically > >> > copy kernel headers and place in the userspace tree to make sure that > >> > iptables compiles standalone, without the need for kernel-headers to > >> > be installed in

Re: [PATCH iptables] include: fix build with kernel headers before 4.2

2018-11-20 Thread Baruch Siach
Hi Pablo, Pablo Neira Ayuso writes: > On Sat, Nov 17, 2018 at 10:28:56PM +0200, Baruch Siach wrote: >> Pablo Neira Ayuso writes: >> > On Fri, Nov 16, 2018 at 09:30:33AM +0200, Baruch Siach wrote: >> >> Commit 672accf1530 (include: update kernel netfilter header files) >> >> updated

RFC: Designing per chain rule cache support in libnftnl

2018-11-20 Thread Phil Sutter
Hi, In order to improve performance in 'nft -f' as well as xtables-restore with very large rulesets, we need to store rules by chain they belong to. In order to avoid pointless code duplication, this should be supported by libnftnl. Looking into the topic, it seems like extending struct

Re: [PATCH nf-next] netfilter: add missing error handling code for register functions.

2018-11-19 Thread Taehee Yoo
On Tue, 20 Nov 2018 at 06:19, Florian Westphal wrote: > Hi Florian! Thank you for the review! > Taehee Yoo wrote: > > register_{netdevice/inetaddr/inet6addr}_notifier returns value that > > could be error value. so that error handling code are needed. > > Nothing should break without those

Re: [PATCH nf-next] netfilter: add missing error handling code for register functions.

2018-11-19 Thread Florian Westphal
Taehee Yoo wrote: > register_{netdevice/inetaddr/inet6addr}_notifier returns value that > could be error value. so that error handling code are needed. Nothing should break without those notifiers in place though. > /* check if the notifier was already set */ > if

Re: [PATCH iptables] include: fix build with kernel headers before 4.2

2018-11-19 Thread Pablo Neira Ayuso
On Sat, Nov 17, 2018 at 10:28:56PM +0200, Baruch Siach wrote: > Hi Pablo, > > Pablo Neira Ayuso writes: > > On Fri, Nov 16, 2018 at 09:30:33AM +0200, Baruch Siach wrote: > >> Commit 672accf1530 (include: update kernel netfilter header files) > >> updated linux/netfilter.h and brought with it the

[PATCH nf-next] netfilter: add missing error handling code for register functions.

2018-11-19 Thread Taehee Yoo
register_{netdevice/inetaddr/inet6addr}_notifier returns value that could be error value. so that error handling code are needed. Signed-off-by: Taehee Yoo --- .../net/netfilter/ipv4/nf_nat_masquerade.h| 2 +- .../net/netfilter/ipv6/nf_nat_masquerade.h| 2 +-

Re: [PATCH nft 2/2] src: introduce simple hints on incorrect chain

2018-11-19 Thread Pablo Neira Ayuso
On Mon, Nov 19, 2018 at 12:55:48PM +0100, Florian Westphal wrote: > Pablo Neira Ayuso wrote: > > # nft list chain x y > > Error: No such file or directory; did you mean table ‘x’ in family ‘inet’? > > list chain x y > > Perhaps make this > "...; did you mean 'inet x'?" Yes. I just pushed out

[PATCH nft,v4 2/3] src: introduce simple hints on incorrect chain

2018-11-19 Thread Pablo Neira Ayuso
# nft list chain x y Error: No such file or directory; did you mean chain ‘y’ in table inet ‘x’? list chain x y ^ Signed-off-by: Pablo Neira Ayuso --- include/rule.h | 3 +++ src/evaluate.c | 31 ++- src/rule.c | 18 ++ 3 files

[PATCH nft,v4 3/3] src: introduce simple hints on incorrect set

2018-11-19 Thread Pablo Neira Ayuso
# nft rule x y ip saddr @y Error: No such file or directory; did you mean set ‘y’ in table inet ‘x’? rule x y ip saddr @y ^^ Signed-off-by: Pablo Neira Ayuso --- include/rule.h | 3 +++ src/evaluate.c | 68 +++---

[PATCH nft,v3 3/3] src: introduce simple hints on incorrect set

2018-11-19 Thread Pablo Neira Ayuso
# nft rule x y ip saddr @y Error: No such file or directory; did you mean set ‘y’ in table inet ‘x’? rule x y ip saddr @y ^^ Signed-off-by: Pablo Neira Ayuso --- include/rule.h | 3 +++ src/evaluate.c | 68 +++---

Re: [PATCH nft 2/2] src: introduce simple hints on incorrect chain

2018-11-19 Thread Florian Westphal
Pablo Neira Ayuso wrote: > # nft list chain x y > Error: No such file or directory; did you mean table ‘x’ in family ‘inet’? > list chain x y Perhaps make this "...; did you mean 'inet x'?" Other than this nit, this looks like a good improvement, thanks!

[PATCH nft 2/2] src: introduce simple hints on incorrect chain

2018-11-19 Thread Pablo Neira Ayuso
# nft list chain x y Error: No such file or directory; did you mean chain ‘y’ in family ‘inet’? list chain x y ^ Signed-off-by: Pablo Neira Ayuso --- include/rule.h | 2 ++ src/evaluate.c | 29 - src/rule.c | 15 +++ 3 files changed,

[PATCH nft 1/2] src: introduce simple hints on incorrect table

2018-11-19 Thread Pablo Neira Ayuso
This patch adds simple infrastructure to provide a hints to user on references to incorrect table. While at it, remove "Could not process rule:" which I think it is implicit in the error. Signed-off-by: Pablo Neira Ayuso --- include/rule.h | 2 ++ src/evaluate.c | 111

[PATCH nft 1/2] src: introduce simple hints on incorrect table

2018-11-19 Thread Pablo Neira Ayuso
This patch adds simple infrastructure to provide a hints to user on references to incorrect table. While at it, remove "Could not process rule:" which I think it is implicit in the error. Signed-off-by: Pablo Neira Ayuso --- This is aiming to address:

[PATCH nft 2/2] src: introduce simple hints on incorrect chain

2018-11-19 Thread Pablo Neira Ayuso
# nft list chain x y Error: No such file or directory; did you mean table ‘x’ in family ‘inet’? list chain x y ^ Signed-off-by: Pablo Neira Ayuso --- include/rule.h | 2 ++ src/evaluate.c | 29 - src/rule.c | 15 +++ 3 files changed,

Re: [PATCHv2 net] ipvs: call ip_vs_dst_notifier earlier than ipv6_dev_notf

2018-11-19 Thread Simon Horman
On Sat, Nov 17, 2018 at 07:14:57PM +0100, Pablo Neira Ayuso wrote: > On Sat, Nov 17, 2018 at 09:19:52PM +0900, Xin Long wrote: > > On Sat, Nov 17, 2018 at 8:15 PM Pablo Neira Ayuso > > wrote: > > > > > > On Fri, Nov 16, 2018 at 06:37:19AM -0800, Simon Horman wrote: > > > > On Fri, Nov 16, 2018

Re: [PATCH nf] netfilter: xt_TEE: fix build failure

2018-11-18 Thread Taehee Yoo
On Mon, 19 Nov 2018 at 02:15, Randy Dunlap wrote: > > On 11/18/18 6:39 AM, Taehee Yoo wrote: > > xt_TEE.c needs nf_dup_ipv6.c to support ipv6 packet duplication. > > So that if xt_TEE is enabled, nf_dup_ipv6 will be automatically selected. > > But there is build failure scenario. > > > > test

Re: [PATCH nf] netfilter: xt_TEE: fix build failure

2018-11-18 Thread Randy Dunlap
On 11/18/18 6:39 AM, Taehee Yoo wrote: > xt_TEE.c needs nf_dup_ipv6.c to support ipv6 packet duplication. > So that if xt_TEE is enabled, nf_dup_ipv6 will be automatically selected. > But there is build failure scenario. > > test config: > CONFIG_NETFILTER_XT_TARGET_TEE=y > CONFIG_NF_DUP_IPV6=m >

[PATCH nf] netfilter: xt_TEE: fix build failure

2018-11-18 Thread Taehee Yoo
xt_TEE.c needs nf_dup_ipv6.c to support ipv6 packet duplication. So that if xt_TEE is enabled, nf_dup_ipv6 will be automatically selected. But there is build failure scenario. test config: CONFIG_NETFILTER_XT_TARGET_TEE=y CONFIG_NF_DUP_IPV6=m compile result: net/netfilter/xt_TEE.o: In function

[PATCH xtables] arptables-nft: use generic expression parsing function

2018-11-18 Thread Florian Westphal
since commit d9c6a5d0977a6d8bbe772dbc31a2c4f58eec1708 ("xtables: merge {ip,arp}tables_command_state structs") arptables uses the shared representation. With only minor changes (e.g., use generic counters in command_state), in print/save functions we can use the shared nftnl expression parser too.

Re: [PATCH iptables] include: fix build with kernel headers before 4.2

2018-11-17 Thread Baruch Siach
Hi Pablo, Pablo Neira Ayuso writes: > On Fri, Nov 16, 2018 at 09:30:33AM +0200, Baruch Siach wrote: >> Commit 672accf1530 (include: update kernel netfilter header files) >> updated linux/netfilter.h and brought with it the update from kernel >> commit a263653ed798 (netfilter: don't pull

Re: [PATCH iptables] xtables-monitor: fix build with musl libc

2018-11-17 Thread Florian Westphal
Baruch Siach wrote: > Commit 7c8791edac3 ("xtables-monitor: fix build with older glibc") > changed the code to use GNU style tcphdr fields. Unfortunately, musl > libc requires _GNU_SOURCE definition to expose these fields. > > Fix the following build failure: Applied, thanks.

[PATCH iptables] xtables-monitor: fix build with musl libc

2018-11-17 Thread Baruch Siach
Commit 7c8791edac3 ("xtables-monitor: fix build with older glibc") changed the code to use GNU style tcphdr fields. Unfortunately, musl libc requires _GNU_SOURCE definition to expose these fields. Fix the following build failure: xtables-monitor.c: In function ‘trace_print_packet’:

Re: [PATCH iptables] include: fix build with kernel headers before 4.2

2018-11-17 Thread Pablo Neira Ayuso
Hi Baruch, On Fri, Nov 16, 2018 at 09:30:33AM +0200, Baruch Siach wrote: > Commit 672accf1530 (include: update kernel netfilter header files) > updated linux/netfilter.h and brought with it the update from kernel > commit a263653ed798 (netfilter: don't pull include/linux/netfilter.h > from netns

Re: [iptables PATCH v2] xtables: Introduce per table chain caches

2018-11-17 Thread Pablo Neira Ayuso
On Thu, Nov 15, 2018 at 02:53:02PM +0100, Phil Sutter wrote: > Being able to omit the previously obligatory table name check when > iterating over the chain cache might help restore performance with large > rulesets in xtables-save and -restore. > > There is one subtle quirk in the code:

[PATCH iptables 4/4] xtables: constify struct builtin_table and struct builtin_chain

2018-11-17 Thread Pablo Neira Ayuso
These definitions should be const, propagate this to all existing users. Signed-off-by: Pablo Neira Ayuso --- iptables/nft.c | 42 +- iptables/nft.h | 14 +++--- iptables/xtables-restore.c | 4 ++--

[PATCH iptables 1/4] nft: add type field to builtin_table

2018-11-17 Thread Pablo Neira Ayuso
Use enum nft_table_type to set the new type field in the structure that define tables. --- iptables/nft.c | 8 iptables/nft.h | 1 + 2 files changed, 9 insertions(+) diff --git a/iptables/nft.c b/iptables/nft.c index 5e55ec13d0da..db86f97c6d29 100644 --- a/iptables/nft.c +++

[PATCH iptables 2/4] nft: move chain_cache back to struct nft_handle

2018-11-17 Thread Pablo Neira Ayuso
Place this back into the structure that stores the state information. Signed-off-by: Pablo Neira Ayuso --- iptables/nft.c | 26 +- iptables/nft.h | 4 +++- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/iptables/nft.c b/iptables/nft.c index

[PATCH iptables 3/4] nft: move initialize to struct nft_handle

2018-11-17 Thread Pablo Neira Ayuso
Move this to the structure that stores, stateful information. Introduce nft_table_initialized() and use it. Signed-off-by: Pablo Neira Ayuso --- iptables/nft.c | 14 ++ iptables/nft.h | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/iptables/nft.c

Re: [PATCH nf] netfilter: xt_hashlimit: fix a possible memory leak in htable_create()

2018-11-17 Thread Pablo Neira Ayuso
On Fri, Nov 16, 2018 at 09:32:35PM +0900, Taehee Yoo wrote: > In the htable_create(), hinfo is allocated by vmalloc() > So that if error occurred, hinfo should be freed. Applied, thanks Taehee.

[PATCH nf] netfilter: xt_hashlimit: fix a possible memory leak in htable_create()

2018-11-16 Thread Taehee Yoo
In the htable_create(), hinfo is allocated by vmalloc() So that if error occurred, hinfo should be freed. Fixes: 11d5f15723c9 ("netfilter: xt_hashlimit: Create revision 2 to support higher pps rates") Signed-off-by: Taehee Yoo --- net/netfilter/xt_hashlimit.c | 9 +++-- 1 file changed, 3

Compliment of the day to you Dear Friend.

2018-11-16 Thread Mrs Amina.Kadi
Compliment of the day to you Dear Friend. Dear Friend. I am Mrs. Amina Kadi. am sending this brief letter to solicit your partnership to transfer $5.5 million US Dollars. I shall send you more information and procedures when I receive positive response from you. Mrs. Amina Kadi

[PATCH iptables] include: fix build with kernel headers before 4.2

2018-11-15 Thread Baruch Siach
Commit 672accf1530 (include: update kernel netfilter header files) updated linux/netfilter.h and brought with it the update from kernel commit a263653ed798 (netfilter: don't pull include/linux/netfilter.h from netns headers). This triggers conflict of headers that is fixed in kernel commit

[ANNOUNCE] nftlb 0.3 release

2018-11-15 Thread Laura Garcia
Hi! I'm honored to present nftlb 0.3 nftlb stands for nftables load balancer, a user space tool that builds a complete load balancer and traffic distributor using the nft infrastructure. nftlb is a nftables rules manager that creates virtual services for load balancing at layer 2, layer 3

Re: Different namespaces share the same xtables lock

2018-11-15 Thread Phil Sutter
Hi Wenxian, On Thu, Nov 15, 2018 at 11:16:49PM +0800, wenxian li wrote: > I was running iptables on different namespaces and met such error > "Another app is currently holding the xtables lock. Perhaps you want > to use the -w option?". > > After googling it, I found this enhancement introduces

Different namespaces share the same xtables lock

2018-11-15 Thread wenxian li
Hi Guys, I was running iptables on different namespaces and met such error "Another app is currently holding the xtables lock. Perhaps you want to use the -w option?". After googling it, I found this enhancement introduces the lock mechanism: "xtables: Add locking to prevent concurrent

[iptables PATCH v2] xtables: Introduce per table chain caches

2018-11-15 Thread Phil Sutter
Being able to omit the previously obligatory table name check when iterating over the chain cache might help restore performance with large rulesets in xtables-save and -restore. There is one subtle quirk in the code: flush_chain_cache() did free the global chain cache if not called with a table

Re: iptc_delete_entry matchmask parameter

2018-11-15 Thread Florian Westphal
Tom Cook wrote: > For a `struct ipt_entry` that I have retrieved using iptc_next_rule [..] Please don't do this, use ip(6)tables-restore instead. You can pipe input to it and you can use --noflush option for batch processing, including multiple deletes/adds/inserts etc. libiptc doesn't do some

Re: iptc_delete_entry matchmask parameter

2018-11-15 Thread Tom Cook
Or, as an alternative way of saying the same thing, can someone please explain why this doesn't delete all rules from my INPUT chain: extern "C" { #include #include #include } #include #include using namespace std; int main() { auto h = iptc_init("filter"); if (h == 0) { std::cout

[iptables PATCH] xtables: Introduce per table chain caches

2018-11-15 Thread Phil Sutter
Being able to omit the previously obligatory table name check when iterating over the chain cache might help restore performance with large rulesets in xtables-save and -restore. There is one subtle quirk in the code: flush_chain_cache() did free the global chain cache if not called with a table

investitora koji mogu osigurati financije za sve projekte u vašoj zemlji==

2018-11-15 Thread Mr. Hussian
Dragi prijatelju, Mi smo tvrtka za investicijsko savjetovanje. Želimo vas obavijestiti da imamo investitora koji mogu osigurati financije za sve projekte u vašoj zemlji bez vlasnika projekta koji putuju nigdje. Ovo je novo financiranje opcija sada i pomislila sam na vas i odlučila vas napisati i

Re: [PATCH xtables] xtables-monitor: fix build with older glibc

2018-11-15 Thread Baruch Siach
Hi Florian, Florian Westphal writes: > Baruch Siach wrote: >> glibc older than 2.19 require _BSD_SOURCE to expose BSD style fields of >> struct tcphdr. Fix the following build failure: >> >> xtables-monitor.c: In function 'trace_print_packet': >> xtables-monitor.c:406:43: error: 'const struct

Re: [PATCH xtables] xtables-monitor: fix build with older glibc

2018-11-15 Thread Florian Westphal
Baruch Siach wrote: > glibc older than 2.19 require _BSD_SOURCE to expose BSD style fields of > struct tcphdr. Fix the following build failure: > > xtables-monitor.c: In function 'trace_print_packet': > xtables-monitor.c:406:43: error: 'const struct tcphdr' has no member named > 'th_sport' >

SHIPMENT DELIVERY

2018-11-14 Thread David Jim Brown
Attention, I am Mr. David Jim Brown, Head Officer-in-Charge, Administrative Service Inspection Unit United Nations Inspection Agency in Hartsfield-Jackson International Airport Atlanta, Georgia. During our investigation, I discovered an abandoned shipment through a Diplomat from United

[PATCH xtables] xtables-monitor: fix build with older glibc

2018-11-14 Thread Baruch Siach
glibc older than 2.19 require _BSD_SOURCE to expose BSD style fields of struct tcphdr. Fix the following build failure: xtables-monitor.c: In function 'trace_print_packet': xtables-monitor.c:406:43: error: 'const struct tcphdr' has no member named 'th_sport' printf("SPORT=%d DPORT=%d ",

iptc_delete_entry matchmask parameter

2018-11-14 Thread Tom Cook
For a `struct ipt_entry` that I have retrieved using iptc_next_rule and which I want to delete from its table, how should I construct the matchmask parameter to iptc_delete_entry? As far as I can tell from reading make_delete_mask, the mask should be the same size as the ipt_entry (including all

[no subject]

2018-11-14 Thread diweiguang88
I hope know kernel's change,so I want to read these important mail.

[no subject]

2018-11-14 Thread diweiguang88
I hope know the change of netfilter module

Re: [PATCH iptables] extensions: format-security fixes in libip[6]t_icmp

2018-11-14 Thread Pablo Neira Ayuso
On Wed, Nov 14, 2018 at 07:35:28AM +0100, Adam Gołębiowski wrote: > commit 61d6c3834de32c0ff5808c93da94b2b30b4791c8 introduced support > for gcc feature to check format string against passed argument. > This commit adds missing bits to extenstions's libipt_icmp.c and > libip6t_icmp6.c that were

[PATCH iptables] extensions: format-security fixes in libip[6]t_icmp

2018-11-13 Thread Adam Gołębiowski
commit 61d6c3834de32c0ff5808c93da94b2b30b4791c8 introduced support for gcc feature to check format string against passed argument. This commit adds missing bits to extenstions's libipt_icmp.c and libip6t_icmp6.c that were causing build to fail. Signed-off-by: Adam Gołębiowski ---

Re: [PATCH xtables] ebtables: vlan: fix userspace/kernel headers collision

2018-11-13 Thread Pablo Neira Ayuso
On Tue, Nov 13, 2018 at 07:22:08PM +0200, Baruch Siach wrote: > Build with musl libc fails because of conflicting struct ethhdr > definitions: > > In file included from .../sysroot/usr/include/net/ethernet.h:10:0, > from ../iptables/nft-bridge.h:8, > from

[PATCH xtables] ebtables: vlan: fix userspace/kernel headers collision

2018-11-13 Thread Baruch Siach
Build with musl libc fails because of conflicting struct ethhdr definitions: In file included from .../sysroot/usr/include/net/ethernet.h:10:0, from ../iptables/nft-bridge.h:8, from libebt_vlan.c:18: .../sysroot/usr/include/netinet/if_ether.h:107:8: error:

[ANNOUNCE] libnftnl 1.1.2 release

2018-11-13 Thread Pablo Neira Ayuso
Hi! The Netfilter project proudly presents: libnftnl 1.1.2 libnftnl is a userspace library providing a low-level netlink programming interface (API) to the in-kernel nf_tables subsystem. This library is currently used by the nft command line tool. This release adds supports for new kernel

Re: [PATCH] doc: grammar fixes

2018-11-13 Thread Pablo Neira Ayuso
Applied including Stefano's minor nitpick. Thanks.

Re: [PATCH] doc: grammar fixes

2018-11-13 Thread Jan Engelhardt
On Tuesday 2018-11-13 12:18, Pablo Neira Ayuso wrote: >Looks good, may I include your Signed-off-by tag? Oh yeah, this is "kernel land" where it's needed ;-) Please also consider folding in Stefano's comment about one "an". Signed-off-by: Jan Engelhardt >On Tue, Nov 13, 2018 at 11:53:30AM

Re: [PATCH] doc: grammar fixes

2018-11-13 Thread Stefano Brivio
While at it, On Tue, 13 Nov 2018 11:53:30 +0100 Jan Engelhardt wrote: > @@ -689,10 +690,10 @@ in. The second form specifies a reference to a named > counter object. > "value":* 'EXPRESSION' > *}}* > > -Change packet data or meta info. > +This changes the packet data or meta info. >

Re: [PATCH] doc: grammar fixes

2018-11-13 Thread Pablo Neira Ayuso
Looks good, may I include your Signed-off-by tag? On Tue, Nov 13, 2018 at 11:53:30AM +0100, Jan Engelhardt wrote: > --- > Additional fixes on top of V. Skyttä's patch: lots of "a", "the", etc. > missing, wrong prepositions addressed. Contractions are expanded for > better write style. > >

Re: [PATCH libnftnl 4/4] src: Use memcpy() to handle potentially unaligned data

2018-11-13 Thread Pablo Neira Ayuso
On Sun, Nov 11, 2018 at 11:52:58PM -0800, Matt Turner wrote: > On Thu, Nov 1, 2018 at 4:29 PM Pablo Neira Ayuso wrote: > > > > On Wed, Oct 31, 2018 at 07:18:04PM -0700, Matt Turner wrote: > > > On Fri, Oct 19, 2018 at 11:09 AM Matt Turner wrote: > > > > If you wouldn't mind, now might be a good

[ANNOUNCE] iptables 1.8.2 release

2018-11-13 Thread Florian Westphal
Hi! The Netfilter project proudly presents: iptables 1.8.2 This release contains the following fixes and enhancements: iptables-nft: - fix bogus handling of '-s 0.0.0.0/8' and the like. - fix the '-f' option - fix wildcard interface matching ebtables-nft: - add support for 'arpreply'

[PATCH] doc: grammar fixes

2018-11-13 Thread Jan Engelhardt
--- Additional fixes on top of V. Skyttä's patch: lots of "a", "the", etc. missing, wrong prepositions addressed. Contractions are expanded for better write style. doc/data-types.txt | 6 +- doc/libnftables-json.adoc | 145 +++-- doc/libnftables.adoc

Re: [PATCH nftables] doc: Spelling and grammar fixes

2018-11-13 Thread Pablo Neira Ayuso
Applied, thanks Ville.

[PATCH nftables] doc: Spelling and grammar fixes

2018-11-13 Thread Ville Skyttä
Signed-off-by: Ville Skyttä --- doc/data-types.txt | 2 +- doc/libnftables-json.adoc | 4 ++-- doc/libnftables.adoc| 2 +- doc/nft.txt | 6 +++--- doc/primary-expression.txt | 2 +- tests/json_echo/run-test.py | 2 +- 6 files changed, 9 insertions(+), 9

Re: [PATCH nf] netfilter: xt_RATEEST: remove netns exit routine

2018-11-13 Thread Pablo Neira Ayuso
On Fri, Oct 19, 2018 at 12:27:57AM +0900, Taehee Yoo wrote: > xt_rateest_net_exit() was added to check whether rules are flushed > successfully. but ->net_exit() callback is called earlier than > ->destroy() callback. > So that ->net_exit() callback can't check that. > > test commands: >%ip

[PATCH nf] netfilter: nf_tables: fix use-after-free when deleting compat expressions

2018-11-12 Thread Florian Westphal
nft_compat ops do not have static storage duration, unlike all other expressions. When nf_tables_expr_destroy() returns, expr->ops might have been free'd already, so we need to store next address before calling expression destructor. For same reason, we can't deref match pointer after

Re: [ebtables PATCH] extensions: among: Fix bitmask check

2018-11-12 Thread Florian Westphal
Phil Sutter wrote: > Boolean AND was applied instead of binary one, causing the exclamation > mark to be printed whenever info->bitmask was non-zero. In practice, > this leads to incorrect output if e.g. --among-src was given with an > inverted match as well as --among-dst with a non-inverted

[PATCH xtables] libxtables: xlate: init buffer to zero

2018-11-12 Thread Florian Westphal
Doesn't affect iptables-translate, but nft (when built with xtables support). Current nftables may print the buffer withput checking if the ->xlate() callback returned 0, so ->data with garbage/random content can be printed. Signed-off-by: Florian Westphal --- libxtables/xtables.c | 1 + 1

[ebtables PATCH] extensions: among: Fix bitmask check

2018-11-12 Thread Phil Sutter
Boolean AND was applied instead of binary one, causing the exclamation mark to be printed whenever info->bitmask was non-zero. In practice, this leads to incorrect output if e.g. --among-src was given with an inverted match as well as --among-dst with a non-inverted one. Output would then list

Re: [PATCH nf-next 0/2] netfilter: nf_flow_table: remove duplicate code in nf_flow_table_core.c

2018-11-12 Thread Pablo Neira Ayuso
On Wed, Nov 07, 2018 at 12:32:34AM +0900, Taehee Yoo wrote: > In this patch series, duplicate code in nf_flow_table_core.c are removed. > > First patch makes nf_flow_table_iterate() static because > that is local function. > > Second patch makes nf_flow_offfload_gc_step() simplier. > Both

Re: [nft PATCH] nft.8: Clarify 'index' option of add rule command

2018-11-12 Thread Pablo Neira Ayuso
On Mon, Nov 12, 2018 at 03:02:52PM +0100, Phil Sutter wrote: > Documentation for add rule command might trick readers into believing > the optional 'index' argument does not need to be that of an existing > rule. This false assumption is fueled by the fact that iptables allows > to insert with

[PATCH nf-next] netfilter: remove NFC_* cache bits

2018-11-12 Thread Pablo Neira Ayuso
These are very very (for long time unused) caching infrastructure definition, remove then. They have nothing to do with the NFC subsystem. Signed-off-by: Pablo Neira Ayuso --- include/uapi/linux/netfilter.h| 4 include/uapi/linux/netfilter_decnet.h | 10 --

Re: [PATCH nf] netfilter: nf_tables: don't use position attribute on rule replacement

2018-11-12 Thread Pablo Neira Ayuso
On Sun, Nov 04, 2018 at 12:07:14PM +0100, Florian Westphal wrote: > Its possible to set both HANDLE and POSITION when replacing a rule. > In this case, the rule at POSITION gets replaced using the > userspace-provided handle. Rule handles are supposed to be generated > by the kernel only. > >

Re: [PATCH nf 0/2] netfilter: nf_tables: don't skip inactive chains during update

2018-11-12 Thread Pablo Neira Ayuso
On Wed, Oct 31, 2018 at 06:26:19PM +0100, Florian Westphal wrote: > This fixes a packet path vs. control plane race caused by > a bogus optimization: When chain is going away we must not > elide updating rules[next_generation]. If we do, then access > to the 'next generation' really access an old

Re: [PATCH nf v2 0/3] netfilter: nf_conncount: fix bugs in conn_free

2018-11-12 Thread Pablo Neira Ayuso
On Mon, Nov 05, 2018 at 03:42:45AM +0900, Taehee Yoo wrote: > Three bugs in nf_conncount are fixed by this patch series. > > First patch fixes inconsistent lock state in conn_free(). > conn_free() is called both BH and process context. so that > spin_lock_bh() should be used. > > Second patch

Re: [PATCH nf 0/2] netfilter: nf_conncount: fix bugs in conn_free

2018-11-12 Thread Pablo Neira Ayuso
On Thu, Oct 25, 2018 at 11:55:48PM +0900, Taehee Yoo wrote: > Two bugs in nf_conncount are fixed by this patch series. > > First patch fixes inconsistent lock state in conn_free(). > conn_free() is called both BH and process context. so that > spin_lock_bh() should be used. > > Second patch

[PATCH xtables 13/13] arptables: fix --version info

2018-11-12 Thread Florian Westphal
old: arptables vlibxtables.so.12 (nf_tables) now: arptables 1.8.1 (nf_tables) Signed-off-by: Florian Westphal --- iptables/xtables-arp.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/iptables/xtables-arp.c b/iptables/xtables-arp.c index

[PATCH xtables 12/13] arptables: ignore --table argument.

2018-11-12 Thread Florian Westphal
You can run 'arptables-legacy -t foobar' and commands work fine, as it still operates on filter table (the only table that exists). Signed-off-by: Florian Westphal --- iptables/xtables-arp.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iptables/xtables-arp.c

[PATCH xtables 11/13] arptables: make uni/multicast mac masks static

2018-11-12 Thread Florian Westphal
Signed-off-by: Florian Westphal --- iptables/xtables-arp.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/iptables/xtables-arp.c b/iptables/xtables-arp.c index bde35e5dcb9c..6a095bfd1629 100644 --- a/iptables/xtables-arp.c +++ b/iptables/xtables-arp.c @@ -233,12

[PATCH xtables 10/13] arptables: add test cases

2018-11-12 Thread Florian Westphal
Unicast being shown as '00:00:00:00:00:00/01:00:00:00:00:00' looks like broken output, however, arptables classic did not pretty-print either. Also add test cases for all targets supported by the original arptables tool: -j CLASSIFY -j MARK -j mangle [ yes, mangle target is lower-case 8-( ]

[PATCH xtables 08/13] arptables: fix src/dst mac handling

2018-11-12 Thread Florian Westphal
1. check both address and mask, not just first byte of mac 2. use add_addr() for this so mask is also handled via bitwise expr. 3. use the correct offsets. 4. add dissector so we can reverse translate the payload expressions generated for this. Signed-off-by: Florian Westphal ---

[PATCH xtables 05/13] arptables: add basic test infra for arptables-nft

2018-11-12 Thread Florian Westphal
Signed-off-by: Florian Westphal --- iptables-test.py | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/iptables-test.py b/iptables-test.py index 34a040422ce7..532dee7c9000 100755 --- a/iptables-test.py +++ b/iptables-test.py @@ -17,10 +17,12 @@ import argparse

[PATCH xtables 09/13] arptables: pre-init hlen and ethertype

2018-11-12 Thread Florian Westphal
to check -s 1.2.3.4, we need to add the size of the hardware address to the arp header to obtain the offset where the ipv4 address begins: base_arphdr HW_ADDR IP_ADDR (src) IP_ADDR (target) In arptables-classic, the kernel will add dev->addr_len to the arp header base address to obtain the

[PATCH xtables 04/13] arptables: fix rule deletion/compare

2018-11-12 Thread Florian Westphal
arptables -D fails most of the time, as we compared source mask with target mask. Signed-off-by: Florian Westphal --- iptables/nft-arp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/iptables/nft-arp.c b/iptables/nft-arp.c index f9352297d83b..675f0eb9daa6 100644 ---

[PATCH xtables 07/13] arptables: fix target ip offset

2018-11-12 Thread Florian Westphal
--dst-ip checks the first four octets of the target mac. Format of ipv4 arp is: arphdr (htype, ptype...) src mac src ip target mac target ip So we need to add hlen (6 bytes) a second time (arphdr + 6 + 4 + 6) to get correct offset. Signed-off-by: Florian Westphal --- iptables/nft-arp.c | 5

[PATCH xtables 06/13] arptables: fix -s/-d handling for negation and mask

2018-11-12 Thread Florian Westphal
also handle negations in other cases. Still to be resolved: mask handling for other options such as hlen. Signed-off-by: Florian Westphal --- iptables/nft-arp.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/iptables/nft-arp.c b/iptables/nft-arp.c

[PATCH xtables 03/13] arptables: remove code that is also commented-out in original arptables

2018-11-12 Thread Florian Westphal
This isn't a missing feature in the -nft version, neither plen and -m were ever implemented in arptables-legacy. Signed-off-by: Florian Westphal --- iptables/xtables-arp.c | 34 +++--- 1 file changed, 3 insertions(+), 31 deletions(-) diff --git

[PATCH xtables 02/13] arptables-save: add -c option, like xtables-save

2018-11-12 Thread Florian Westphal
arptables classic doesn't have arptables-save, it only has a perl script that attempts to emulate iptables-save. It supports no options, and thus has no way to dump counters. Add -c option, like iptables to enable this. Signed-off-by: Florian Westphal --- iptables/nft-arp.c | 17

[PATCH xtables 01/13] arptables: use ->save for arptables-save, like xtables

2018-11-12 Thread Florian Westphal
arptables-save will show -A OUTPUT --h-length 6 --h-type 1 -j MARK --set-xmark 0x1/0x as --h-length 6 --h-type Ethernet -j MARK MARK set 0x1 Because it uses ->print() instead of ->save(). Switch it to use ->save, we can then also drop special handling of CLASSIFY target. Signed-off-by:

[PATCH xtables 00/13] arptables: make it work

2018-11-12 Thread Florian Westphal
This series adds test cases for arptables-nft and fixes various bugs that got uncovered here. extensions/libarpt_CLASSIFY.t |4 + extensions/libarpt_MARK.t |4 + extensions/libarpt_mangle.c |6 + extensions/libarpt_mangle.t |5 + extensions/libarpt_standard.t | 14

[nft PATCH] nft.8: Clarify 'index' option of add rule command

2018-11-12 Thread Phil Sutter
Documentation for add rule command might trick readers into believing the optional 'index' argument does not need to be that of an existing rule. This false assumption is fueled by the fact that iptables allows to insert with last rule number + 1 to actually append to a chain. Change the relevant

[PATCH xtables] xtables: add 'printf' attribute to xlate_add

2018-11-12 Thread Florian Westphal
This allows gcc to check format string vs. passed arguments. Fix the fallout from this as well, typical warning produced is: libebt_mark_m.c:112:28: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Wformat=] xt_xlate_add(xl, "and 0x%x

Re: [iptables PATCH 0/3] A few minor fixes

2018-11-12 Thread Florian Westphal
Phil Sutter wrote: > The first two deal with incorrect/unexpected error messages, only the > last one fixes a "real" issue. > > Phil Sutter (3): > xtables: Fix typo in do_command() error message > xtables: Clarify error message when deleting by index > xtables: Fix error return code in

[iptables PATCH 2/3] xtables: Clarify error message when deleting by index

2018-11-12 Thread Phil Sutter
Trying to delete a rule by index from a non-existent chain leads to a somewhat confusing error message: | # iptables-nft -D foobar 1 | iptables: Index of deletion too big. Fix this by performing chain existence checks for CMD_DELETE_NUM, too. Signed-off-by: Phil Sutter --- iptables/xtables.c

[iptables PATCH 0/3] A few minor fixes

2018-11-12 Thread Phil Sutter
The first two deal with incorrect/unexpected error messages, only the last one fixes a "real" issue. Phil Sutter (3): xtables: Fix typo in do_command() error message xtables: Clarify error message when deleting by index xtables: Fix error return code in nft_chain_user_rename()

[iptables PATCH 3/3] xtables: Fix error return code in nft_chain_user_rename()

2018-11-12 Thread Phil Sutter
If the chain to rename wasn't found, the function would return -1 which got interpreted as success. Signed-off-by: Phil Sutter --- iptables/nft.c | 4 ++-- iptables/tests/shell/testcases/iptables/0004-return-codes_0 | 4 2 files changed, 6

[iptables PATCH 1/3] xtables: Fix typo in do_command() error message

2018-11-12 Thread Phil Sutter
This checks p->chain for existence, not cs->jumpto. Fixes this bogus error message: | # iptables-nft -t nat -A FORWARD -j ACCEPT | iptables v1.8.1 (nf_tables): Chain 'ACCEPT' does not exist Fixes: b6a06c1a215f8 ("xtables: Align return codes with legacy iptables") Signed-off-by: Phil Sutter ---

Inquiry 12/11/2018

2018-11-12 Thread Daniel Murray
Hi,friend, This is Daniel Murray and i am from Sinara Group Co.Ltd Group Co.,LTD in Russia. We are glad to know about your company from the web and we are interested in your products. Could you kindly send us your Latest catalog and price list for our trial order. Best Regards, Daniel

[PATCH iptables] nft: add NFT_TABLE_* enumeration

2018-11-12 Thread Pablo Neira Ayuso
Signed-off-by: Pablo Neira Ayuso --- iptables/nft.c | 26 +- iptables/nft.h | 20 +++- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/iptables/nft.c b/iptables/nft.c index d098068e01ca..dab7fbe235d2 100644 --- a/iptables/nft.c +++

[PATCH xtables 2/2] ebtables: use extrapositioned negation consistently

2018-11-12 Thread Florian Westphal
in the iptables universe, we enforce extrapositioned negation: ! -i foo "-i ! foo" is not even supported anymore. At least make sure that ebtables prints the former syntax everywhere as well so we don't have a mix of both ways. Parsing of --option ! 42 will still work for backwards compat

<    1   2   3   4   5   6   7   8   9   10   >