]> git.ipfire.org Git - thirdparty/strongswan.git/commit
child-cfg: Fix apply_jitter() in case jitter is bigger than rekey value
authorDmitriy Alexandrov <d06alexandrov@gmail.com>
Mon, 14 Nov 2022 10:09:52 +0000 (14:09 +0400)
committerTobias Brunner <tobias@strongswan.org>
Mon, 12 Dec 2022 13:24:32 +0000 (14:24 +0100)
commitb4508656151009a8e3bb83ae60b25d14556aa543
treefbbe89aaf015827e3b9942cd489cbbae72b4645e
parent44378d2521bee895b4a47070e39eedcb7356a9ce
child-cfg: Fix apply_jitter() in case jitter is bigger than rekey value

Also avoid returning 0 and disabling rekeying in the rare case of
`jitter = rekey` and the `1/jitter` chance of that happening (returning
1 at least doesn't disable rekeying).

Co-authored-by: Tobias Brunner <tobias@strongswan.org>
Closes strongswan/strongswan#1414
src/libcharon/config/child_cfg.c