9ff9b2398de79de9439b9a0700d94d5c6ba0d173
[openwrt/staging/ansuel.git] /
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Wed, 28 Jul 2021 05:43:29 +0200
3 Subject: [PATCH] ndisc_snoop: call dl_list_del before freeing ipv6 addresses
4
5 Fixes a segmentation fault on sta disconnect
6
7 Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 ---
9
10 --- a/src/ap/ndisc_snoop.c
11 +++ b/src/ap/ndisc_snoop.c
12 @@ -61,6 +61,7 @@ void sta_ip6addr_del(struct hostapd_data
13 dl_list_for_each_safe(ip6addr, prev, &sta->ip6addr, struct ip6addr,
14 list) {
15 hostapd_drv_br_delete_ip_neigh(hapd, 6, (u8 *) &ip6addr->addr);
16 + dl_list_del(&ip6addr->list);
17 os_free(ip6addr);
18 }
19 }