tests: Fix radius_das_disconnect match + non-match case
If Calling-Station-Id matches, but CUI does not, NAS is expected to reject the request instead of accepting it. Verify that Disconnect-NAK is returned for this. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
861beb7269
commit
c2b48088f6
1 changed files with 5 additions and 4 deletions
|
@ -469,11 +469,12 @@ def test_radius_das_disconnect(dev, apdev):
|
||||||
logger.debug("RADIUS response from hostapd")
|
logger.debug("RADIUS response from hostapd")
|
||||||
for i in reply.keys():
|
for i in reply.keys():
|
||||||
logger.debug("%s: %s" % (i, reply[i]))
|
logger.debug("%s: %s" % (i, reply[i]))
|
||||||
if reply.code != pyrad.packet.DisconnectACK:
|
if reply.code != pyrad.packet.DisconnectNAK:
|
||||||
raise Exception("Unexpected response code")
|
raise Exception("Unexpected response code")
|
||||||
|
if 'Error-Cause' not in reply:
|
||||||
dev[0].wait_disconnected(timeout=10)
|
raise Exception("Missing Error-Cause")
|
||||||
dev[0].wait_connected(timeout=10, error="Re-connection timed out")
|
if reply['Error-Cause'][0] != 503:
|
||||||
|
raise Exception("Unexpected Error-Cause: {}".format(reply['Error-Cause']))
|
||||||
|
|
||||||
logger.info("Disconnect-Request with matching CUI")
|
logger.info("Disconnect-Request with matching CUI")
|
||||||
dev[1].connect("radius-das", key_mgmt="WPA-EAP",
|
dev[1].connect("radius-das", key_mgmt="WPA-EAP",
|
||||||
|
|
Loading…
Reference in a new issue