summaryrefslogtreecommitdiff
path: root/package/network/services/hostapd/patches/200-multicall.patch
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2017-01-25 08:32:00 +0100
committerRafał Miłecki <rafal@milecki.pl>2017-02-05 22:29:56 +0100
commita0bc62fe08beae87de8051b7e642715240b9d16c (patch)
treec36eb4fb7dde2c0949f938b3b435208d38744851 /package/network/services/hostapd/patches/200-multicall.patch
parent3f9a194e04a7bd857bcdd06e44616abef5dab209 (diff)
downloadmtk-20170518-a0bc62fe08beae87de8051b7e642715240b9d16c.zip
mtk-20170518-a0bc62fe08beae87de8051b7e642715240b9d16c.tar.gz
mtk-20170518-a0bc62fe08beae87de8051b7e642715240b9d16c.tar.bz2
hostapd: backport support for sending debug messages to the syslog
It wasn't possible to read hostapd wpa_printf messages unless running hostapd manually. It was because hostapd was printing them using vprintf and not directly to the syslog. We were trying to workaround this problem by redirecting STDIN_FILENO and STDOUT_FILENO but it was working only for the initialization phase. As soon as hostapd did os_daemonize our solution stopped working. Please note despite the subject this change doesn't affect debug level messages only but just everything printed by hostapd with wpa_printf including MSG_ERROR-s. This makes it even more important as reading error messages can be quite useful for debugging. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'package/network/services/hostapd/patches/200-multicall.patch')
-rw-r--r--package/network/services/hostapd/patches/200-multicall.patch10
1 files changed, 5 insertions, 5 deletions
diff --git a/package/network/services/hostapd/patches/200-multicall.patch b/package/network/services/hostapd/patches/200-multicall.patch
index 9ea3ef9..f034820 100644
--- a/package/network/services/hostapd/patches/200-multicall.patch
+++ b/package/network/services/hostapd/patches/200-multicall.patch
@@ -36,7 +36,7 @@
LIBS += $(DRV_AP_LIBS)
ifdef CONFIG_L2_PACKET
-@@ -1073,6 +1079,12 @@ install: $(addprefix $(DESTDIR)$(BINDIR)
+@@ -1077,6 +1083,12 @@ install: $(addprefix $(DESTDIR)$(BINDIR)
BCHECK=../src/drivers/build.hostapd
@@ -49,7 +49,7 @@
hostapd: $(BCHECK) $(OBJS)
$(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS)
@$(E) " LD " $@
-@@ -1114,6 +1126,12 @@ HOBJS += ../src/crypto/aes-internal.o
+@@ -1118,6 +1130,12 @@ HOBJS += ../src/crypto/aes-internal.o
HOBJS += ../src/crypto/aes-internal-enc.o
endif
@@ -293,7 +293,7 @@
wpa_debug_open_file(params->wpa_debug_file_path);
--- a/hostapd/main.c
+++ b/hostapd/main.c
-@@ -583,6 +583,11 @@ fail:
+@@ -590,6 +590,11 @@ fail:
return -1;
}
@@ -305,14 +305,14 @@
#ifdef CONFIG_WPS
static int gen_uuid(const char *txt_addr)
-@@ -660,6 +665,8 @@ int main(int argc, char *argv[])
+@@ -667,6 +672,8 @@ int main(int argc, char *argv[])
interfaces.global_ctrl_sock = -1;
dl_list_init(&interfaces.global_ctrl_dst);
+ wpa_supplicant_event = hostapd_wpa_event;
+ wpa_supplicant_event_global = hostapd_wpa_event_global;
for (;;) {
- c = getopt(argc, argv, "b:Bde:f:hi:KP:STtu:vg:G:");
+ c = getopt(argc, argv, "b:Bde:f:hi:KP:sSTtu:vg:G:");
if (c < 0)
--- a/src/drivers/drivers.c
+++ b/src/drivers/drivers.c