Fix Linux packat socket regression work around
authorJouni Malinen <j@w1.fi>
Fri, 6 Feb 2015 23:13:34 +0000 (01:13 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 7 Feb 2015 13:37:13 +0000 (15:37 +0200)
commit23ed011bea8e87fe662f888759f4d1e6b1e8d99d
tree920d6b12f9d55b3893cc9a4eab8eb2121f595adf
parentd821e2f2942ba05b8c41ba2c8d79d2f61edf27d6
Fix Linux packat socket regression work around

Commit e6dd8196e5daf39e4204ef8ecd26dd50fdca6040 ('Work around Linux
packet socket regression') added a mechanism to close the workaround
bridge socket in l2_packet_receive(). However, it did not take into
account the possibility of the l2->rx_callback() closing the l2_packet
socket altogether. This could result in use of freed memory when usin
RSN pre-authentication. Fix this by reordering the calls to clear the
workaround socket before calling the rx_callback.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/l2_packet/l2_packet_linux.c