aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2011-11-15 18:23:15 +0100
committerTobias Brunner <tobias@strongswan.org>2012-03-20 17:30:40 +0100
commit8f3aea2f774c5647c6cb7e4da664c6323f5cc669 (patch)
treee5d625c8dbf6e416e8c0f92dacb2adee1f749215 /src
parent130c9a54c2c9c5586d685bf98b3bf004f7465d8f (diff)
downloadstrongswan-8f3aea2f774c5647c6cb7e4da664c6323f5cc669.tar.bz2
strongswan-8f3aea2f774c5647c6cb7e4da664c6323f5cc669.tar.xz
Message rules for IKEv1 INFORMATIONAL exchange added.
Since INFORMATIONAL "exchanges" are actually unidirectionally sent message we don't have any responder rules.
Diffstat (limited to 'src')
-rw-r--r--src/libcharon/encoding/message.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/libcharon/encoding/message.c b/src/libcharon/encoding/message.c
index 5386d4984..823a97f0f 100644
--- a/src/libcharon/encoding/message.c
+++ b/src/libcharon/encoding/message.c
@@ -542,6 +542,26 @@ static payload_order_t aggressive_r_order[] = {
{NOTIFICATION_V1, 0},
{VENDOR_ID_V1, 0},
};
+
+/**
+ * Message rule for INFORMATIONAL_V1 from initiator.
+ */
+static payload_rule_t informational_i_rules_v1[] = {
+/* payload type min max encr suff */
+ {NOTIFICATION_V1, 0, MAX_NOTIFY_PAYLOADS, TRUE, FALSE},
+ {DELETE_V1, 0, MAX_DELETE_PAYLOADS, TRUE, FALSE},
+ {VENDOR_ID_V1, 0, MAX_VID_PAYLOADS, TRUE, FALSE},
+};
+
+/**
+ * payload order for INFORMATIONAL_V1 from initiator.
+ */
+static payload_order_t informational_i_order_v1[] = {
+/* payload type notify type */
+ {NOTIFICATION_V1, 0},
+ {DELETE_V1, 0},
+ {VENDOR_ID_V1, 0},
+};
#endif /* USE_IKEV1 */
/**
@@ -607,6 +627,10 @@ static message_rule_t message_rules[] = {
countof(aggressive_r_rules), aggressive_r_rules,
countof(aggressive_r_order), aggressive_r_order,
},
+ {INFORMATIONAL_V1, TRUE, TRUE,
+ countof(informational_i_rules_v1), informational_i_rules_v1,
+ countof(informational_i_order_v1), informational_i_order_v1,
+ },
/* TODO-IKEv1: define rules for other exchanges */
#endif /* USE_IKEV1 */
};