Avoid returning COOKIEs right after system boot
authorTobias Brunner <tobias@strongswan.org>
Thu, 31 Jan 2013 17:42:26 +0000 (18:42 +0100)
committerTobias Brunner <tobias@strongswan.org>
Tue, 19 Mar 2013 15:19:11 +0000 (16:19 +0100)
commit68bfee4bc414b9b254dbe73cace5b6f5133ad0be
tree87e3f71dccfcd443c212a0bf764c3046a1353c5d
parent2071dd63d6812392a4b939cd592826e94aaf5341
Avoid returning COOKIEs right after system boot

When the monotonic timer is initialized to 0 right after the system is
booted the daemon responded with COOKIES for COOKIE_CALMDOWN_DELAY (10s).

Since the COOKIE verification code actually produces an overflow for
COOKIE_LIFETIME (10s) it wouldn't even accept properly returned COOKIEs.

Checking for last_cookie makes sense anyway as that condition must only
apply if we actually sent a COOKIE before.
src/libcharon/network/receiver.c