Netfilter-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH nft] xfrm: spi is big endian
@ 2020-01-14 12:40 Florian Westphal
  2020-01-14 13:27 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Westphal @ 2020-01-14 12:40 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Florian Westphal

the kernel stores spi in a __be32, so fix up the byteorder annotation
accordingly.

Signed-off-by: Florian Westphal <fw@strlen.de>
---
 src/xfrm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/xfrm.c b/src/xfrm.c
index d0773ab789f1..80f0ea037429 100644
--- a/src/xfrm.c
+++ b/src/xfrm.c
@@ -39,7 +39,7 @@ const struct xfrm_template xfrm_templates[] = {
 	[NFT_XFRM_KEY_DADDR_IP6]	= XFRM_TEMPLATE_BE("daddr", &ip6addr_type, 16 * BITS_PER_BYTE),
 	[NFT_XFRM_KEY_SADDR_IP6]	= XFRM_TEMPLATE_BE("saddr", &ip6addr_type, 16 * BITS_PER_BYTE),
 	[NFT_XFRM_KEY_REQID]		= XFRM_TEMPLATE_HE("reqid", &integer_type, 4 * BITS_PER_BYTE),
-	[NFT_XFRM_KEY_SPI]		= XFRM_TEMPLATE_HE("spi", &integer_type, 4 * BITS_PER_BYTE),
+	[NFT_XFRM_KEY_SPI]		= XFRM_TEMPLATE_BE("spi", &integer_type, 4 * BITS_PER_BYTE),
 };
 
 static void xfrm_expr_print(const struct expr *expr, struct output_ctx *octx)
-- 
2.24.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH nft] xfrm: spi is big endian
  2020-01-14 12:40 [PATCH nft] xfrm: spi is big endian Florian Westphal
@ 2020-01-14 13:27 ` Pablo Neira Ayuso
  2020-01-14 13:39   ` Florian Westphal
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo Neira Ayuso @ 2020-01-14 13:27 UTC (permalink / raw)
  To: Florian Westphal; +Cc: netfilter-devel

On Tue, Jan 14, 2020 at 01:40:15PM +0100, Florian Westphal wrote:
> the kernel stores spi in a __be32, so fix up the byteorder annotation
> accordingly.
> 
> Signed-off-by: Florian Westphal <fw@strlen.de>

Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>

Please, update tests/py too, I guess that will spew a warning after
this update?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH nft] xfrm: spi is big endian
  2020-01-14 13:27 ` Pablo Neira Ayuso
@ 2020-01-14 13:39   ` Florian Westphal
  0 siblings, 0 replies; 3+ messages in thread
From: Florian Westphal @ 2020-01-14 13:39 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: Florian Westphal, netfilter-devel

Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> On Tue, Jan 14, 2020 at 01:40:15PM +0100, Florian Westphal wrote:
> > the kernel stores spi in a __be32, so fix up the byteorder annotation
> > accordingly.
> > 
> > Signed-off-by: Florian Westphal <fw@strlen.de>
> 
> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
> 
> Please, update tests/py too, I guess that will spew a warning after
> this update?

Yup, pushed with amended test case, thanks for the reminder.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-14 12:40 [PATCH nft] xfrm: spi is big endian Florian Westphal
2020-01-14 13:27 ` Pablo Neira Ayuso
2020-01-14 13:39   ` Florian Westphal

Netfilter-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netfilter-devel/0 netfilter-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netfilter-devel netfilter-devel/ https://lore.kernel.org/netfilter-devel \
		netfilter-devel@vger.kernel.org
	public-inbox-index netfilter-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netfilter-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git