xfrm: spi is big endian
Florian Westphal
maintainerPATCH 1/1 xfrm: spi is big endian
the kernel stores spi in a __be32, so fix up the byteorder annotation accordingly.
Signed-off-by Florian Westphal <[email protected]>
--- src/xfrm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/xfrm.c +1 -1
@@ -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)
Signature · 1 line
2.24.1
Quoted 4 lines · Florian Westphal
the kernel stores spi in a
__be32, so fix up the byteorder annotation accordingly.Signed-off-by Florian Westphal <[email protected]>
Please, update tests/py too, I guess that will spew a warning after this update?
Florian Westphal
maintainerQuoted 10 lines · Pablo Neira Ayuso
Quoted 4 lines · Florian Westphal
the kernel stores spi in a
__be32, so fix up the byteorder annotation accordingly.Signed-off-by Florian Westphal <[email protected]>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.