Caught cancel(cancel) and cancel/abandon(abandon/bind/unbind), partly fixed cancel(cn=config update) problem, without doing this:
Suggested partual fix - add this possible value for o_cancel: #define SLAP_CANCEL_INVALID 0x04 /* like 0 but prevents Cancel */
Still need something that to fix cancel(cn=config update) completely.
syncrepl/syncprov, starttls not yet addressed.
Also cancel(cancel) still behaves in a non-RFC way. Correct fix would require resetting o_abandon, which seems unsafe. Who knows what has already reacted to it.
Will update this patch for the remaining issues later:
Something like this: http://folk.uio.no/hbf/OpenLDAP/cancel-cancel.txt