]> git.ipfire.org Git - thirdparty/strongswan.git/commit
kernel-netlink: Don't add replay state twice when updating SAs
authorTobias Brunner <tobias@strongswan.org>
Tue, 7 Nov 2023 16:39:51 +0000 (17:39 +0100)
committerTobias Brunner <tobias@strongswan.org>
Mon, 13 Nov 2023 11:36:57 +0000 (12:36 +0100)
commit3cb843436765cec853e35a15be343ec0624665ce
tree05da0b219374ed8fdf293065765ec10b5aa5a60d
parentb345eb30514557cf6d831f22168385fab2ff5637
kernel-netlink: Don't add replay state twice when updating SAs

The kernel includes the XFRMA_REPLAY_ESN_VAL attribute when dumping
SAs since it was added with 2.6.39.  So we basically added this attribute
twice to the message sent to the kernel, potentially exceeding the
message buffer if the window size is large.

The XFRMA_REPLAY_VAL attribute is only dumped since 3.19, so that might
still be relevant (Google seems to maintain a 3.18 kernel) and since we
have to query the current lifetime stats anyway, we can just avoid adding
this attribute twice.

Closes strongswan/strongswan#1967
src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c