diff options
author | Jouni Malinen <jouni@qca.qualcomm.com> | 2015-01-16 10:10:52 (GMT) |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2015-01-16 10:50:16 (GMT) |
commit | 861beb7269946b9b940b6233ebaae19d6ee3cdf0 (patch) | |
tree | 46691b89bb4c9d0d20f0fcdd76795ce9bc8228c2 /src/radius | |
parent | 201c9ad77f180e0f015bb4b9ce9ddb550d0d7820 (diff) | |
download | hostap-861beb7269946b9b940b6233ebaae19d6ee3cdf0.zip hostap-861beb7269946b9b940b6233ebaae19d6ee3cdf0.tar.gz hostap-861beb7269946b9b940b6233ebaae19d6ee3cdf0.tar.bz2 |
RADIUS DAS: Check for single session match for Disconnect-Request
Previously, the first matching STA was picked. That is not really the
design in RFC 5176, so extend this matching code to go through all
specified session identification attributes and verify that all of them
match. In addition, check for a possible case of multiple sessions
matching. If such a case is detected, return with Disconnect-NAK and
Error-Code 508 (multiple session selection not supported).
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src/radius')
-rw-r--r-- | src/radius/radius_das.c | 6 | ||||
-rw-r--r-- | src/radius/radius_das.h | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/radius/radius_das.c b/src/radius/radius_das.c index 9655f4c..7aa703c 100644 --- a/src/radius/radius_das.c +++ b/src/radius/radius_das.c @@ -147,6 +147,12 @@ static struct radius_msg * radius_das_disconnect(struct radius_das_data *das, "%s:%d", abuf, from_port); error = 503; break; + case RADIUS_DAS_MULTI_SESSION_MATCH: + wpa_printf(MSG_INFO, + "DAS: Multiple sessions match for request from %s:%d", + abuf, from_port); + error = 508; + break; case RADIUS_DAS_SUCCESS: error = 0; break; diff --git a/src/radius/radius_das.h b/src/radius/radius_das.h index e3ed540..1d76c26 100644 --- a/src/radius/radius_das.h +++ b/src/radius/radius_das.h @@ -14,7 +14,8 @@ struct radius_das_data; enum radius_das_res { RADIUS_DAS_SUCCESS, RADIUS_DAS_NAS_MISMATCH, - RADIUS_DAS_SESSION_NOT_FOUND + RADIUS_DAS_SESSION_NOT_FOUND, + RADIUS_DAS_MULTI_SESSION_MATCH, }; struct radius_das_attrs { |