[Swan-commit] Changes to ref refs/heads/master
cagney at vault.libreswan.fi
Fri Nov 29 15:32:11 UTC 2019
Author: Andrew Cagney <cagney at gnu.org>
Date: Thu Nov 28 22:05:23 2019 -0500
ikev2: update boiler-plate code at the start of transition functions
Consistent debug-log message, check MD, check IKE and/or CHILD SA,
check state, check MD.ST.
Both v2_msg_role(NULL) and v2_msg_role(fake_md()) return NO_MESSAGE.
Conversely MESSAGE_REQUEST and MESSAGE_RESPONSE both imply MD!=NULL.
The code only expects MD.ST==ST when MD.ST exists and is non-NULL (per
above, MD may not be real). Most code paths have no reason to care
about MD.ST (the exceptions are: code in cahoots with functions
yanking ST from under everyones feet; and code switching, or even
double switching state mid-transition).
More information about the Swan-commit