From: Tobias Brunner Date: Tue, 15 Nov 2011 17:23:15 +0000 (+0100) Subject: Message rules for IKEv1 INFORMATIONAL exchange added. X-Git-Tag: 5.0.0~338^2~9^2~514 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f3aea2f774c5647c6cb7e4da664c6323f5cc669;p=thirdparty%2Fstrongswan.git Message rules for IKEv1 INFORMATIONAL exchange added. Since INFORMATIONAL "exchanges" are actually unidirectionally sent message we don't have any responder rules. --- diff --git a/src/libcharon/encoding/message.c b/src/libcharon/encoding/message.c index 5386d4984c..823a97f0f8 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 */ };