Remove duplicate check that never could execute because the exact same
authorpatrick <patrick@openbsd.org>
Mon, 4 Dec 2017 17:22:39 +0000 (17:22 +0000)
committerpatrick <patrick@openbsd.org>
Mon, 4 Dec 2017 17:22:39 +0000 (17:22 +0000)
condition is handled a line before.

sbin/iked/ikev2_pld.c

index f3e21c3..71dd30a 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: ikev2_pld.c,v 1.67 2017/12/04 17:03:43 patrick Exp $  */
+/*     $OpenBSD: ikev2_pld.c,v 1.68 2017/12/04 17:22:39 patrick Exp $  */
 
 /*
  * Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
@@ -369,11 +369,6 @@ ikev2_pld_sa(struct iked *env, struct ikev2_payload *pld,
                            sap.sap_spisize);
                        return (-1);
                }
-               if (total < sap.sap_spisize) {
-                       log_debug("%s: malformed payload: SPI too large "
-                           "(%zu < %d)", __func__, total, sap.sap_spisize);
-                       return (-1);
-               }
                switch (sap.sap_spisize) {
                case 4:
                        memcpy(&spi32, msgbuf + offset, 4);