From 6e5bae3735425b27264418a07d32fd0bcbb9d802 Mon Sep 17 00:00:00 2001 From: "7u83@mail.ru" <7u83@mail.ru@noemail.net> Date: Mon, 14 Mar 2016 07:20:46 +0000 Subject: [PATCH] Added some missing message elements. FossilOrigin-Name: 53a37c69650f5f33ed79033c3328f194b80fcef22224b93fb0b545ecd27ae906 --- src/mod/capwap/capwap_actions_wtp.c | 40 ++++++++++++++++++- src/mod/capwap80211/capwap80211_actions_wtp.c | 30 ++++++++++++++ src/mod/cisco/cisco_actions_wtp.c | 13 ++++++ src/mod/cisco/mod_cisco_wtp.c | 4 +- 4 files changed, 84 insertions(+), 3 deletions(-) diff --git a/src/mod/capwap/capwap_actions_wtp.c b/src/mod/capwap/capwap_actions_wtp.c index d2014ce6..ff19a2f3 100644 --- a/src/mod/capwap/capwap_actions_wtp.c +++ b/src/mod/capwap/capwap_actions_wtp.c @@ -131,7 +131,7 @@ static cw_action_in_t actions_in[] = { { .capwap_state = CW_STATE_JOIN, .msg_id = CW_MSG_JOIN_RESPONSE, - .elem_id = CW_ELEM_ECN_SUÜPPRT, + .elem_id = CW_ELEM_ECN_SUPPORT, .item_id = CW_ITEM_ECN_SUPPORT, .start = cw_in_generic2, .min_len = 1, @@ -140,6 +140,44 @@ static cw_action_in_t actions_in[] = { } , + /* CAPWAP Control IPv4 Address - Join Response*/ + { + .capwap_state = CW_STATE_JOIN, + .msg_id = CW_MSG_JOIN_RESPONSE, + .elem_id = CW_ELEM_CAPWAP_CONTROL_IPV4_ADDRESS, + .item_id = CW_ITEM_CAPWAP_CONTROL_IP_ADDRESS_LIST, + .start = cw_in_capwap_control_ip_address, + .min_len = 6, + .max_len = 6, + .mand = 1 + } + , + + /* CAPWAP Control IPv6 Address - Join Response*/ + { + .capwap_state = CW_STATE_JOIN, + .msg_id = CW_MSG_JOIN_RESPONSE, + .elem_id = CW_ELEM_CAPWAP_CONTROL_IPV6_ADDRESS, + .item_id = CW_ITEM_CAPWAP_CONTROL_IP_ADDRESS_LIST, + .start = cw_in_capwap_control_ip_address, // Change to v6 handler + .min_len = 18, + .max_len = 18, + .mand = 1 + } + , + + + /* Maximum Message Length - Join Response */ + { + .capwap_state = CW_STATE_JOIN, + .msg_id = CW_MSG_JOIN_RESPONSE, + .elem_id = CW_ELEM_MAXIMUM_MESSAGE_LENGTH, + .start = cw_in_generic2, + .item_id = CW_ITEM_MAXIMUM_MESSAGE_LENGTH, + .min_len = 2, + .max_len = 2 + } + , /* ---------------------------------------------------------------- diff --git a/src/mod/capwap80211/capwap80211_actions_wtp.c b/src/mod/capwap80211/capwap80211_actions_wtp.c index 14ae83dc..0920afd6 100644 --- a/src/mod/capwap80211/capwap80211_actions_wtp.c +++ b/src/mod/capwap80211/capwap80211_actions_wtp.c @@ -21,6 +21,36 @@ static cw_action_in_t actions_wtp_in[] = { * Discovery Resquest */ + /* 802.11 Radio Inmformation - Discovery Response */ + { + .capwap_state = CW_STATE_DISCOVERY, + .msg_id = CW_MSG_DISCOVERY_RESPONSE, + .elem_id = CW_ELEM80211_WTP_RADIO_INFORMATION, + .item_id = "radio_information", + .start = cw_in_radio_generic, + .mand = 1, + .min_len = 5, + .max_len = 5 + } + , + + /* -------------------------------------------------------- + * Join Response + */ + + /* 802.11 Radio Inmformation - Join Response */ + { + .capwap_state = CW_STATE_JOIN, + .msg_id = CW_MSG_JOIN_RESPONSE, + .elem_id = CW_ELEM80211_WTP_RADIO_INFORMATION, + .item_id = "radio_information", + .start = cw_in_radio_generic, + .mand = 1, + .min_len = 5, + .max_len = 5 + } + , + // {0, 0, CW_STATE_DISCOVERY, CW_MSG_DISCOVERY_REQUEST, diff --git a/src/mod/cisco/cisco_actions_wtp.c b/src/mod/cisco/cisco_actions_wtp.c index 8e6f3508..0ef409f2 100644 --- a/src/mod/cisco/cisco_actions_wtp.c +++ b/src/mod/cisco/cisco_actions_wtp.c @@ -33,6 +33,19 @@ static cw_action_in_t actions_in[] = { + /* ECN Support - Join Request */ + { + .capwap_state = CW_STATE_JOIN, + .msg_id = CW_MSG_JOIN_RESPONSE, + .elem_id = CW_ELEM_ECN_SUPPORT, + .item_id = CW_ITEM_ECN_SUPPORT, + .start = cw_in_generic2, + .mand = 0, + .min_len = 1, + .max_len = 1 + } + , + /* End of list */ diff --git a/src/mod/cisco/mod_cisco_wtp.c b/src/mod/cisco/mod_cisco_wtp.c index 6079b104..38eebe21 100644 --- a/src/mod/cisco/mod_cisco_wtp.c +++ b/src/mod/cisco/mod_cisco_wtp.c @@ -12,7 +12,7 @@ #include "cw/vendors.h" -extern int cisco_register_actions80211_ac(struct cw_actiondef *def); +extern int cisco_register_actions80211_wtp(struct cw_actiondef *def); extern int cisco_register_actions_wtp(struct cw_actiondef *def); static int register_actions(struct cw_actiondef *actions, int mode) @@ -45,7 +45,7 @@ static int register_actions(struct cw_actiondef *actions, int mode) return 1; } cmod->register_actions(actions, MOD_MODE_BINDINGS); - int rc = cisco_register_actions80211_ac(actions); + int rc = cisco_register_actions80211_wtp(actions); cw_dbg(DBG_INFO, "Initialized mod cisco 80211 with %d actions", rc); return 0; }