wpa_supplicant logfile ignored if syslog specified

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When wpa_supplicant is invoked via ifup and a logfile is specified in /etc/network/interfaces, the correct logfile switch is generated, but /etc/wpa_supplicant/functions.sh always includes "-s" (syslog) as a default option. When both -f and -s are present, the logfile is opened but never written to and debug output instead goes to syslog.

I'm not sure if this is the proper fix, but it is working in my case.


diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index e0ee553..6150c1a 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -6264,10 +6264,12 @@ struct wpa_global * wpa_supplicant_init(struct wpa_params *params)
 
        if (params->wpa_debug_file_path)
                wpa_debug_open_file(params->wpa_debug_file_path);
-       else
+       else {
                wpa_debug_setup_stdout();
-       if (params->wpa_debug_syslog)
-               wpa_debug_open_syslog();
+               // only open syslog if logfile not specified
+               if (params->wpa_debug_syslog)
+                       wpa_debug_open_syslog();
+       }
        if (params->wpa_debug_tracing) {
                ret = wpa_debug_open_linux_tracing();
                if (ret) {


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux