-/* $OpenBSD: ikev2_pld.c,v 1.65 2017/12/04 16:52:16 patrick Exp $ */
+/* $OpenBSD: ikev2_pld.c,v 1.66 2017/12/04 16:57:40 patrick Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
"size (%zu < %zu)", __func__, left, sap_length);
return (-1);
}
- /*
- * NB: There might be more proposals, we parse only the first one.
- * This condition must never be true.
- */
- if (left < sap_length) {
- log_debug("%s: payload malformed: SA payload length mismatches "
- "proposal substructure length (%lu < %zu)", __func__,
- left, sap_length);
- return (-1);
- }
/*
* If there is only one proposal, sap_length must be the
* total payload size.