allow multiple DELETE payloads in an informational message
authorMartin Willi <martin@strongswan.org>
Thu, 11 Sep 2008 11:14:09 +0000 (11:14 -0000)
committerMartin Willi <martin@strongswan.org>
Thu, 11 Sep 2008 11:14:09 +0000 (11:14 -0000)
src/charon/encoding/message.c

index 9b393f0..a605bd3 100644 (file)
  */
 #define MAX_NOTIFY_PAYLOADS 20
 
+/**
+ * Max number of delete payloads per IKEv2 Message
+ */
+#define MAX_DELETE_PAYLOADS 20
+
 
 typedef struct payload_rule_t payload_rule_t;
 
@@ -299,7 +304,7 @@ static payload_rule_t informational_i_payload_rules[] = {
 /*     payload type                                    min     max                                             encr    suff */
        {NOTIFY,                                                0,      MAX_NOTIFY_PAYLOADS,    TRUE,   FALSE},
        {CONFIGURATION,                                 0,      1,                                              TRUE,   FALSE},
-       {DELETE,                                                0,      1,                                              TRUE,   FALSE},
+       {DELETE,                                                0,      MAX_DELETE_PAYLOADS,    TRUE,   FALSE},
        {VENDOR_ID,                                             0,      10,                                             TRUE,   FALSE},
 };
 
@@ -324,7 +329,7 @@ static payload_rule_t informational_r_payload_rules[] = {
 /*     payload type                                    min     max                                             encr    suff */
        {NOTIFY,                                                0,      MAX_NOTIFY_PAYLOADS,    TRUE,   FALSE},
        {CONFIGURATION,                                 0,      1,                                              TRUE,   FALSE},
-       {DELETE,                                                0,      1,                                              TRUE,   FALSE},
+       {DELETE,                                                0,      MAX_DELETE_PAYLOADS,    TRUE,   FALSE},
        {VENDOR_ID,                                             0,      10,                                             TRUE,   FALSE},
 };