This patch adds 80% of UINT32_MAX limit on sequence number.
When sequence number reaches limit kernel sends SADB_EXPIRE message to
IKE daemon which is responsible to perform rekeying.
Since replay field is optional, I think you need add the check that it is not NULL.
Added checking if pointer to reply structure is not NULL