From: Florian Westphal <fw@strlen.de>
To: Phil Sutter <phil@nwl.cc>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [iptables PATCH] ruleparse: arp: Fix for all-zero mask on Big Endian
Date: Thu, 29 Jan 2026 15:58:33 +0100 [thread overview]
Message-ID: <aXt1mToz6_7g9P88@strlen.de> (raw)
In-Reply-To: <20260128214443.27971-1-phil@nwl.cc>
Phil Sutter <phil@nwl.cc> wrote:
> With 16bit mask values, the first two bytes of bitwise.mask in struct
> nft_xt_ctx_reg are significant. Reading the first 32bit-sized field
> works only on Little Endian, on Big Endian the mask appears in the upper
> two bytes which are discarded when assigning to a 16bit variable.
nft-ruleparse-arp.c: In function 'nft_arp_parse_payload':
nft-ruleparse-arp.c:93:77: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
93 | fw->arp.arhrd_mask = ((uint16_t *)reg->bitwise.mask)[0];
| ^
nft-ruleparse-arp.c:102:77: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
102 | fw->arp.arpro_mask = ((uint16_t *)reg->bitwise.mask)[0];
| ^
nft-ruleparse-arp.c:111:77: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
111 | fw->arp.arpop_mask = ((uint16_t *)reg->bitwise.mask)[0];
| ^
next prev parent reply other threads:[~2026-01-29 14:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-28 21:44 [iptables PATCH] ruleparse: arp: Fix for all-zero mask on Big Endian Phil Sutter
2026-01-29 14:58 ` Florian Westphal [this message]
2026-01-29 15:24 ` Phil Sutter
2026-01-29 16:24 ` Florian Westphal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aXt1mToz6_7g9P88@strlen.de \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=phil@nwl.cc \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.