forked from openwrt/openwrt
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hostapd: fix a segfault on sta disconnect with proxy arp enabled
Signed-off-by: Felix Fietkau <nbd@nbd.name>
- Loading branch information
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
...k/services/hostapd/patches/023-ndisc_snoop-call-dl_list_del-before-freeing-ipv6-add.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
From: Felix Fietkau <nbd@nbd.name> | ||
Date: Wed, 28 Jul 2021 05:43:29 +0200 | ||
Subject: [PATCH] ndisc_snoop: call dl_list_del before freeing ipv6 addresses | ||
|
||
Fixes a segmentation fault on sta disconnect | ||
|
||
Signed-off-by: Felix Fietkau <nbd@nbd.name> | ||
--- | ||
|
||
--- a/src/ap/ndisc_snoop.c | ||
+++ b/src/ap/ndisc_snoop.c | ||
@@ -61,6 +61,7 @@ void sta_ip6addr_del(struct hostapd_data | ||
dl_list_for_each_safe(ip6addr, prev, &sta->ip6addr, struct ip6addr, | ||
list) { | ||
hostapd_drv_br_delete_ip_neigh(hapd, 6, (u8 *) &ip6addr->addr); | ||
+ dl_list_del(&ip6addr->list); | ||
os_free(ip6addr); | ||
} | ||
} |