path: root/wpaspy
Commit message (Collapse)AuthorAgeFilesLines
* wpaspy: Handle DETACH response more robustlyJouni Malinen2014-04-281-1/+4
| | | | | | | | | | | | | There could be pending unsolicited event messages on the monitor socket when the DETACH command is issued. As such, the response may be something else then OK even if the actual detach operation succeeded. Try to avoid this be dropping pending messages before issuing the detach command. As an additional workaround, check the response against FAIL instead of requiring OK so that the self.attached does not get left to True incorrectly even if an additional event message were to be received. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Wait longer for hostapd REMOVE command to completeJouni Malinen2014-03-121-2/+2
| | | | | | | | | | | | | | Some kernel debugging options (especially CONFIG_DEBUG_KOBJECT_RELEASE=y) can add significant blocking time to interface removal with NL80211_CMD_DEL_INTERFACE and SIOCGIFBR(BRCTL_DEL_BRIDGE) block for 1-8 seconds. This could result in the VLAN test cases failing due to a wpaspy timeout on the REMOVE command even though the issue was only in the kernel debugging code making the operations significantly slower. Work around this by using a longer timeout for that control interface command to allow this type of debug kernel to be used. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* wpaspy: Add optional timeout argument for pending()Jouni Malinen2014-01-071-2/+2
| | | | | | | This can be used to wait for up to the specified limit on new event messages. Signed-hostap: Jouni Malinen <j@w1.fi>
* wpaspy: Do not leave socket files behind if connection failsJouni Malinen2013-12-311-1/+6
| | | | | | | Ctrl::__init__ needs to handle socket.connect() exceptions and unlink the client socket file on failures. Signed-hostap: Jouni Malinen <j@w1.fi>
* wpaspy: Fix tracking of attached statusJouni Malinen2013-12-311-1/+7
| | | | | | | The attached variable was initialized and checked, but never updated. Fix that by updating it on successful ATTACH/DETACH command. Signed-hostap: Jouni Malinen <j@w1.fi>
* wpaspy: Add native Python implementation of ctrl_iface accessJouni Malinen2013-03-181-0/+70
| | | | | | | | | This can be used as a replacement for the wpaspy.c module that uses wpa_ctrl.c to access wpa_supplicant/hostapd control interface. Only the UNIX domain socket version of the control interface is currently supported. Signed-hostap: Jouni Malinen <j@w1.fi>
* wpaspy: Fix exception handling in the test scriptJouni Malinen2013-03-161-2/+1
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* wpaspy: Add Python bindings for wpa_ctrlJouni Malinen2013-03-014-0/+320
This allows Python to be used to control wpa_supplicant/hostapd through the control interface. Signed-hostap: Jouni Malinen <j@w1.fi>