mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-18 10:54:03 -05:00
Fix DHCP/NDISC snoop deinit followed by failing re-init
It was possible to hit a double-free on the l2_packet socket if initialization of DHCP/NDISC snoop failed on a hostapd interface that had previously had those enabled successfully. Fix this by clearing the l2_packet pointers during deinit. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
6baab31c6c
commit
d4359923e1
@ -154,4 +154,5 @@ int dhcp_snoop_init(struct hostapd_data *hapd)
|
||||
void dhcp_snoop_deinit(struct hostapd_data *hapd)
|
||||
{
|
||||
l2_packet_deinit(hapd->sock_dhcp);
|
||||
hapd->sock_dhcp = NULL;
|
||||
}
|
||||
|
@ -182,4 +182,5 @@ int ndisc_snoop_init(struct hostapd_data *hapd)
|
||||
void ndisc_snoop_deinit(struct hostapd_data *hapd)
|
||||
{
|
||||
l2_packet_deinit(hapd->sock_ndisc);
|
||||
hapd->sock_ndisc = NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user