def test_ap_acl_deny(dev, apdev):
    'MAC ACL deny list'
    ssid = 'acl'
    params = {}
    filename = hostapd.acl_file(dev, apdev, 'hostapd.macaddr')
    hostapd.send_file(apdev[0], filename, filename)
    params['ssid'] = ssid
    params['deny_mac_file'] = filename
    hapd = hostapd.add_ap(apdev[0], params)
    dev[0].scan_for_bss(apdev[0]['bssid'], freq='2412', passive=True)
    dev[0].connect(ssid, key_mgmt='NONE', scan_freq='2412', wait_connect=False)
    dev[1].scan_for_bss(apdev[0]['bssid'], freq='2412')
    dev[1].connect(ssid, key_mgmt='NONE', scan_freq='2412')
    ev = dev[0].wait_event(['CTRL-EVENT-CONNECTED'], timeout=1)
    if (ev is not None):
        raise Exception('Unexpected association')
    if filename.startswith('/tmp/'):
        os.unlink(filename)
MAC ACL deny list
def test_ap_acl_deny(dev, apdev):
    
    ssid = 'acl'
    params = {}
    filename = hostapd.acl_file(dev, apdev, 'hostapd.macaddr')
    hostapd.send_file(apdev[0], filename, filename)
    params['ssid'] = ssid
    params['deny_mac_file'] = filename
    hapd = hostapd.add_ap(apdev[0], params)
    dev[0].scan_for_bss(apdev[0]['bssid'], freq='2412', passive=True)
    dev[0].connect(ssid, key_mgmt='NONE', scan_freq='2412', wait_connect=False)
    dev[1].scan_for_bss(apdev[0]['bssid'], freq='2412')
    dev[1].connect(ssid, key_mgmt='NONE', scan_freq='2412')
    ev = dev[0].wait_event(['CTRL-EVENT-CONNECTED'], timeout=1)
    if (ev is not None):
        raise Exception('Unexpected association')
    if filename.startswith('/tmp/'):
        os.unlink(filename)