WPS: Add prefixes to public event_* functions
openssl engines may dynamically load external libraries. Our event_*() functions happen to be named very generically, such that event_add() collides with the libevent library (https://libevent.org/). This can have disastrous effects (esp. when using CONFIG_WPA_TRACE, which enables partial linking) when our SSL engines call into the WPS event_add() instead of their intended libevent event_add(). Resolve this by providing a more unique prefix to these functions. Rename performed via: sed -i -E \ 's:\<event_(add|delete_all|send_all_later|send_stop_all)\>:wps_upnp_event_\1:g' \ $(git grep -l event_) Tested via (among other things) hwsim '-f ap_wps' module. Signed-off-by: Brian Norris <briannorris@chromium.org>
This commit is contained in:
parent
e371d3771c
commit
e6d3aca9cf
4 changed files with 29 additions and 26 deletions
|
@ -3130,7 +3130,7 @@ def test_ap_wps_upnp_subscribe(dev, apdev):
|
|||
sid = resp.getheader("sid")
|
||||
logger.debug("Subscription SID " + sid)
|
||||
|
||||
with alloc_fail(hapd, 1, "=event_add"):
|
||||
with alloc_fail(hapd, 1, "=wps_upnp_event_add"):
|
||||
for i in range(2):
|
||||
dev[1].dump_monitor()
|
||||
dev[2].dump_monitor()
|
||||
|
@ -3150,7 +3150,7 @@ def test_ap_wps_upnp_subscribe(dev, apdev):
|
|||
if resp.status != 200:
|
||||
raise Exception("Unexpected HTTP response: %d" % resp.status)
|
||||
|
||||
with alloc_fail(hapd, 1, "wpabuf_dup;event_add"):
|
||||
with alloc_fail(hapd, 1, "wpabuf_dup;wps_upnp_event_add"):
|
||||
dev[1].dump_monitor()
|
||||
dev[2].dump_monitor()
|
||||
dev[1].request("WPS_PIN " + apdev[0]['bssid'] + " 12345670")
|
||||
|
@ -3198,7 +3198,7 @@ def test_ap_wps_upnp_subscribe(dev, apdev):
|
|||
if resp.status != 500:
|
||||
raise Exception("Unexpected HTTP response: %d" % resp.status)
|
||||
|
||||
with alloc_fail(hapd, 1, "event_add;subscription_first_event"):
|
||||
with alloc_fail(hapd, 1, "wps_upnp_event_add;subscription_first_event"):
|
||||
conn.request("SUBSCRIBE", eventurl.path, "\r\n\r\n", headers)
|
||||
resp = conn.getresponse()
|
||||
if resp.status != 500:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue