From e02d9261dff292ffa2bf84e9e0f36eac0ee70feb Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 21 Jul 2023 08:29:34 +0000 Subject: [PATCH] add missing patch for hostapd update Signed-off-by: Felix Fietkau --- .../patches/701-reload_config_inline.patch | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 feeds/wifi-ax/hostapd/patches/701-reload_config_inline.patch diff --git a/feeds/wifi-ax/hostapd/patches/701-reload_config_inline.patch b/feeds/wifi-ax/hostapd/patches/701-reload_config_inline.patch new file mode 100644 index 000000000..e73b7adae --- /dev/null +++ b/feeds/wifi-ax/hostapd/patches/701-reload_config_inline.patch @@ -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 = ""; ++ } 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 = ""; ++ } 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));