From bfba8e4149dbcd836749e155eb2bac21f3c943dc Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Mon, 10 Feb 2020 22:49:43 +0100 Subject: [PATCH] Correct value of SizeofXfrmUsersaFlush struct xfrm_usersa_flush contains a single u8, thus sizeof(struct xfrm_usersa_flush) == 1 as can be verified by running the following code through go tool cgo -godefs: package xfrm_test // #include import "C" const SizeofXfrmUsersaFlush = C.sizeof_struct_xfrm_usersa_flush which results in // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs foo.go package xfrm_test const SizeofXfrmUsersaFlush = 0x1 Signed-off-by: Tobias Klauser --- nl/xfrm_state_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nl/xfrm_state_linux.go b/nl/xfrm_state_linux.go index b6290fd..43a947f 100644 --- a/nl/xfrm_state_linux.go +++ b/nl/xfrm_state_linux.go @@ -13,7 +13,7 @@ const ( SizeofXfrmAlgoAuth = 0x48 SizeofXfrmAlgoAEAD = 0x48 SizeofXfrmEncapTmpl = 0x18 - SizeofXfrmUsersaFlush = 0x8 + SizeofXfrmUsersaFlush = 0x1 SizeofXfrmReplayStateEsn = 0x18 )