mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-30 01:52:51 +00:00
add missing patch for hostapd update
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
committed by
John Crispin
parent
2f7a1e5952
commit
e02d9261df
33
feeds/wifi-ax/hostapd/patches/701-reload_config_inline.patch
Normal file
33
feeds/wifi-ax/hostapd/patches/701-reload_config_inline.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
--- a/hostapd/config_file.c
|
||||
+++ b/hostapd/config_file.c
|
||||
@@ -4706,7 +4706,12 @@ struct hostapd_config * hostapd_config_r
|
||||
int errors = 0;
|
||||
size_t i;
|
||||
|
||||
- f = fopen(fname, "r");
|
||||
+ if (!strncmp(fname, "data:", 5)) {
|
||||
+ f = fmemopen((void *)(fname + 5), strlen(fname + 5), "r");
|
||||
+ fname = "<inline>";
|
||||
+ } else {
|
||||
+ f = fopen(fname, "r");
|
||||
+ }
|
||||
if (f == NULL) {
|
||||
wpa_printf(MSG_ERROR, "Could not open configuration file '%s' "
|
||||
"for reading.", fname);
|
||||
--- a/wpa_supplicant/config_file.c
|
||||
+++ b/wpa_supplicant/config_file.c
|
||||
@@ -318,8 +318,13 @@ struct wpa_config * wpa_config_read(cons
|
||||
while (cred_tail && cred_tail->next)
|
||||
cred_tail = cred_tail->next;
|
||||
|
||||
+ if (!strncmp(name, "data:", 5)) {
|
||||
+ f = fmemopen((void *)(name + 5), strlen(name + 5), "r");
|
||||
+ name = "<inline>";
|
||||
+ } else {
|
||||
+ f = fopen(name, "r");
|
||||
+ }
|
||||
wpa_printf(MSG_DEBUG, "Reading configuration file '%s'", name);
|
||||
- f = fopen(name, "r");
|
||||
if (f == NULL) {
|
||||
wpa_printf(MSG_ERROR, "Failed to open config file '%s', "
|
||||
"error: %s", name, strerror(errno));
|
||||
Reference in New Issue
Block a user