Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#1117 - hostapd-common: wrong/obsolete parameters supplied to wpa_supplicant #6602

Closed
openwrt-bot opened this issue Oct 26, 2017 · 1 comment
Labels

Comments

@openwrt-bot
Copy link

qwertz123:

Supply the following if possible:
=====Device problem occurs on=====
TP-Link WDR4300

=====Software versions of LEDE release, packages, etc.=====
DISTRIB_ID='LEDE'
DISTRIB_RELEASE='SNAPSHOT'
DISTRIB_REVISION='r5172-21e59ee'
DISTRIB_CODENAME='reboot'
DISTRIB_TARGET='ar71xx/generic'
DISTRIB_ARCH='mips_24kc'
DISTRIB_DESCRIPTION='LEDE Reboot SNAPSHOT r5172-21e59ee'
DISTRIB_TAINTS=''

I'm using an image assembled with imagebuilder with full wpa_supplicant:
$ EXTRA_PACKAGES='dnsmasq dropbear firewall haveged hostapd hostapd-utils ip6tables iperf iptables iptables-mod-conntrack-extra iptables-mod-filter iptables-mod-ipopt iw kmod-ath kmod-cfg80211 kmod-ifb kmod-ip6tables kmod-ipt-conntrack kmod-ipt-conntrack-extra kmod-ipt-core kmod-ipt-filter kmod-ipt-ipopt kmod-ipt-nat kmod-leds-gpio kmod-ledtrig-default-on kmod-ledtrig-netdev kmod-ledtrig-timer kmod-mac80211 kmod-nls-iso8859-1 kmod-nls-utf8 kmod-sched-connmark kmod-zram libiwinfo-lua luci-app-firewall luci-app-openvpn luci-app-qos luci-app-watchcat luci-i18n-base-de luci-i18n-base-en luci-i18n-firewall-de luci-i18n-openvpn-de luci-i18n-qos-de luci-mod-admin-full luci-proto-ipv6 luci-proto-ppp mc mtd netcat openvpn-openssl ppp ppp-mod-pppoe qos-scripts swap-utils tc ubox uci uhttpd watchcat -wpad -wpad-mini wpa-supplicant zoneinfo-europe zoneinfo-simple zram-swap luci-theme-material luci-theme-bootstrap'
$ make image PROFILE=tl-wdr4300-v1 PACKAGES="$EXTRA_PACKAGES"

=====Steps to reproduce=====
Try to join as WDS-Client (or maybe plain Client) to an WPA secured wifi network.
Revision r4692-1e13c6f and older always worked fine, broke somewhere before r5099-5fff2f44d5.
In syslog only the output of ''wpa_supplicant -h'' ist displayed, see below.

Same image works fine as AccessPoint.
=====Possible solution=====
I patched ''/lib/netifd/hostapd.sh'' to see which parameters are used (simple echo "$hostapd-call" 1>&2 inside function wpa_supplicant_run):

Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): trying to run: Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): /usr/sbin/wpa_supplicant -B -s -P "/var/run/wpa_supplicant-wlan0.pid" -D nl80211 -i "wlan0" -c "/var/run/wpa_supplicant-wlan0.conf" -C "/var/run/wpa_supplicant" -H /var/run/hostapd/wlan0-1 Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): wpa_supplicant v2.7-devel Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): Copyright (c) 2003-2017, Jouni Malinen and contributors Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): This software may be distributed under the terms of the BSD license. Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): See README for more details. Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): usage: Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): wpa_supplicant [-BddhKLqqtvW] [-P] [-g] \ Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): [-G] \ Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): -i -c [-C] [-D] [-H] [-p] \ Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): [-b] [-e] \ Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): [-o] [-O] \ Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): [-N -i -c [-C] [-D] \ Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): [-p] [-b] [-I] ...] Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): drivers: Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): nl80211 = Linux nl80211/cfg80211 Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): wext = Linux wireless extensions (generic) Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): wired = Wired Ethernet driver Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): options: Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): -b = optional bridge interface name Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): -B = run daemon in the background Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): -c = Configuration file Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): -C = ctrl_interface parameter (only used if -c is not) Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): -d = increase debugging verbosity (-dd even more) Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): -D = driver name (can be multiple drivers: nl80211,wext) Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): -e = entropy file Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): -g = global ctrl_interface Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): -G = global ctrl_interface group Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): -h = show this help text Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): -H = connect to a hostapd instance to manage state changes Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): -i = interface name Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): -I = additional configuration file Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): -K = include keys (passwords, etc.) in debug output Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): -L = show license (BSD) Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): -N = start describing new interface Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): -o = override driver parameter for new interfaces Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): -O = override ctrl_interface parameter for new interfaces Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): -p = driver parameters Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): -P = PID file Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): -q = decrease debugging verbosity (-qq even less) Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): -t = include timestamp in debug messages Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): -v = show version Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): -W = wait for a control interface monitor before starting Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): example: Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_supplicant.conf Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): cat: can't open '/var/run/wpa_supplicant-wlan0.pid': No such file or directory Thu Oct 26 10:00:17 2017 daemon.notice netifd: radio0 (8202): WARNING (wireless_add_process): executable path /usr/sbin/wpa_supplicant does not match process path () I could find nothing about the ''-s'' parameter to wpa_supplicant, which also isn't mentioned in the help. I patched it out and joining the network seems to work again.

(I googled the parameter and according to some bsd man page, it is meant to be this:
-s Send log messages through syslog(3) instead of to the terminal.
but I cannot find anything about it in the current 2.6+ wpa_supplicant docs.)

I don't know if this is the correct fix, but patch attached (relative to target file system root). Since I've only got imagebuilder sources and I'm no developer I'm sure the patch is in the wrong format....

The patched file seems to come from the package hostapd-common*.ipk.

@openwrt-bot
Copy link
Author

jow-:

It seems the "-s" parameter is only available when wpa_supplicant was built with "CONFIG_DEBUG_SYSLOG". I suppose it should be enabled (especially for the full wpa_supplicant variant) when scripts rely on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant