Netfilter updates for net-next
Subsystems (3)
Pablo Neira Ayuso
maintainercover Netfilter updates for net-next
Hi,
The following patchset contains Netfilter updates for net-next. This round addresses fallout from previous pull request:
1) Remove #warning from ipt_LOG.h and ip6t_LOG.h headers, from Jeremy Sowden.
2) Incorrect parens in memcmp() in nft_bitwise, from Nathan Chancellor.
You can pull these changes from:
git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git
Thanks.
----------------------------------------------------------------
The following changes since commit 5181b473d64ee278f24035ce335b89ddc4520fc0:
net: phy: realtek: add NBase-T PHY auto-detection (2019-08-14 13:26:08 -0400)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git HEAD
for you to fetch changes up to 83c156d3ecc0121d27dc2b7f34e829b265c70c4f:
netfilter: nft_bitwise: Adjust parentheses to fix memcmp size argument (2019-08-14 23:36:45 +0200)
----------------------------------------------------------------
Jeremy Sowden (1):
netfilter: remove deprecation warnings from uapi headers.
Nathan Chancellor (1):
netfilter: nft_bitwise: Adjust parentheses to fix memcmp size argument
include/uapi/linux/netfilter_ipv4/ipt_LOG.h | 2 -- include/uapi/linux/netfilter_ipv6/ip6t_LOG.h | 2 -- net/netfilter/nft_bitwise.c | 4 ++-- 3 files changed, 2 insertions(+), 6 deletions(-)
Pablo Neira Ayuso
maintainerPATCH 1/2 netfilter: remove deprecation warnings from uapi headers.
From: Jeremy Sowden <[email protected]>
There are two netfilter userspace headers which contain deprecation warnings. While these headers are not used within the kernel, they are compiled stand-alone for header-testing.
Pablo informs me that userspace iptables still refer to these headers, and the intention was to use xt_LOG.h instead and remove these, but userspace was never updated.
Remove the warnings.
--- include/uapi/linux/netfilter_ipv4/ipt_LOG.h | 2 -- include/uapi/linux/netfilter_ipv6/ip6t_LOG.h | 2 -- 2 files changed, 4 deletions(-)
include/uapi/linux/netfilter_ipv4/ipt_LOG.h +0 -2
@@ -2,8 +2,6 @@#ifndef _IPT_LOG_H#define _IPT_LOG_H -#warning "Please update iptables, this file will be removed soon!" -/* make sure not to change this without changing netfilter.h:NF_LOG_* (!) */ #define IPT_LOG_TCPSEQ 0x01/* Log TCP sequence numbers */ #define IPT_LOG_TCPOPT 0x02/* Log TCP options */
include/uapi/linux/netfilter_ipv6/ip6t_LOG.h +0 -2
@@ -2,8 +2,6 @@#ifndef _IP6T_LOG_H#define _IP6T_LOG_H -#warning "Please update iptables, this file will be removed soon!" -/* make sure not to change this without changing netfilter.h:NF_LOG_* (!) */ #define IP6T_LOG_TCPSEQ 0x01/* Log TCP sequence numbers */ #define IP6T_LOG_TCPOPT 0x02/* Log TCP options */
Signature · 1 line
2.11.0
Pablo Neira Ayuso
maintainerPATCH 2/2 netfilter: nft_bitwise: Adjust parentheses to fix memcmp size argument
In reply to Pablo Neira AyusoFrom: Nathan Chancellor <[email protected]>
clang warns:
net/netfilter/nft_bitwise.c:138:50: error: size argument in 'memcmp' call is a comparison [-Werror,-Wmemsize-comparison]
if (memcmp(&priv->xor, &zero, sizeof(priv->xor) ||
~~~~~~~~~~~~~~~~~~^~
net/netfilter/nft_bitwise.c:138:6: note: did you mean to compare the
result of 'memcmp' instead?
if (memcmp(&priv->xor, &zero, sizeof(priv->xor) ||
^
)
net/netfilter/nft_bitwise.c:138:32: note: explicitly cast the argument
to size_t to silence this warning
if (memcmp(&priv->xor, &zero, sizeof(priv->xor) ||
^
(size_t)(1 error generated.
Adjust the parentheses so that the result of the sizeof is used for the size argument in memcmp, rather than the result of the comparison (which would always be true because sizeof is a non-zero number).
--- net/netfilter/nft_bitwise.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/netfilter/nft_bitwise.c +2 -2
@@ -135,8 +135,8 @@ static int nft_bitwise_offload(struct nft_offload_ctx *ctx, {const struct nft_bitwise *priv =nft_expr_priv (expr); -if (memcmp (&priv->xor, &zero,sizeof (priv->xor) || - priv->sreg != priv->dreg)) +if (memcmp (&priv->xor, &zero,sizeof (priv->xor)) || + priv->sreg != priv->dreg)return -EOPNOTSUPP ;memcpy (&ctx->regs[priv->dreg].mask, &priv->mask,sizeof (priv->mask));
Signature · 1 line
2.11.0
David Miller
maintainerFrom: Pablo Neira Ayuso <[email protected]>
Date: Wed, 14 Aug 2019 23:43:45 +0200
Quoted 11 lines
The following patchset contains Netfilter updates for net-next. This round addresses fallout from previous pull request:
1) Remove #warning from
ipt_LOG.handip6t_LOG.hheaders, from Jeremy Sowden.2) Incorrect parens in
memcmp()innft_bitwise, from Nathan Chancellor.You can pull these changes from:
git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git
Pulled, thanks.