IPsec RFC6479 support for replay window sizes up to 2^32 - 32 packets.
authorfabient <fabient@FreeBSD.org>
Fri, 25 Nov 2016 14:44:49 +0000 (14:44 +0000)
committerfabient <fabient@FreeBSD.org>
Fri, 25 Nov 2016 14:44:49 +0000 (14:44 +0000)
commit2a3ca2933d0efd0f486eebb1a575528440873633
tree1ed2019b0695d920986e4b721c6938557c8500e6
parentdaeb893b0f14147c8783ca138a770a6c18bc3020
IPsec RFC6479 support for replay window sizes up to 2^32 - 32 packets.

Since the previous algorithm, based on bit shifting, does not scale
with large replay windows, the algorithm used here is based on
RFC 6479: IPsec Anti-Replay Algorithm without Bit Shifting.
The replay window will be fast to be updated, but will cost as many bits
in RAM as its size.

The previous implementation did not provide a lock on the replay window,
which may lead to replay issues.

Reviewed by: ae
Obtained from: emeric.poupon@stormshield.eu
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D8468
lib/libipsec/pfkey.c
lib/libipsec/pfkey_dump.c
sys/net/pfkeyv2.h
sys/netipsec/ipsec.c
sys/netipsec/key.c
sys/netipsec/key_debug.c
sys/netipsec/keydb.h
sys/netipsec/xform_ah.c
sys/netipsec/xform_esp.c