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

[Bug]: wpa_cli Could not connect to wpa_supplicant #10653

Closed
mywalkb opened this issue May 13, 2022 · 0 comments
Closed

[Bug]: wpa_cli Could not connect to wpa_supplicant #10653

mywalkb opened this issue May 13, 2022 · 0 comments
Labels
bug report Something is not working properly. root Issue is related to stuff requiring root permissions or root-packages.

Comments

@mywalkb
Copy link
Contributor

mywalkb commented May 13, 2022

Problem description

wpa_cli included in wpa-supplicant (root-packages) has a wrong path for bind connection to unix socket.

clock_gettime(CLOCK_BOOTTIME, {tv_sec=448722, tv_nsec=356975793}) = 0
socket(AF_UNIX, SOCK_DGRAM, 0)          = 3
bind(3, {sa_family=AF_UNIX, sun_path="/tmp/wpa_ctrl_6315-1"}, 110) = -1 ENOENT (No such file or directory)
close(3)                                = 0
write(1, "Could not connect to wpa_supplic"..., 55Could not connect to wpa_supplicant: wlan0 - re-trying) = 55

source file ./src/common/wpa_ctrl.c has the define CONFIG_CTRL_IFACE_CLIENT_DIR "/tmp" and CONFIG_CTRL_IFACE_CLIENT_PREFIX "wpa_ctrl_"

strings /data/data/com.termux/files/usr/bin/wpa_cli | grep wpa_ctrl_                                                                                                                                  
/tmp/wpa_ctrl_%d-%d
%s/wpa_ctrl_%d-%d

I think it can be patched with "/data/local/tmp", I can make a PR but I need install dev environment.

What steps will reproduce the bug?

  • wpa_supplicant -Dnl80211 -iwlan0 -c/data/local/tmp/wpa.conf -O /data/local/tmp/wpa_supplicant
  • wpa_cli -p /data/local/tmp/wpa_supplicant

What is the expected behavior?

wpa_cli should connect to wpa_supplicant for manage

System information

termux-info:

Termux Variables:
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PID=7907
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://packages-cf.termux.org/apt/termux-main/ stable main
# root-repo (sources.list.d/root.list)
deb https://packages.termux.org/apt/termux-root root stable
Updatable packages:
All packages up to date
Android version:
11
Kernel build information:
Linux localhost 4.14.180-perf-ge2a1322887a5 #1 SMP PREEMPT Thu Mar 24 00:55:18 CST 2022 aarch64 Android
Device manufacturer:
Xiaomi
Device model:
Redmi Note 9 Pro
@mywalkb mywalkb added the bug report Something is not working properly. label May 13, 2022
@xtkoba xtkoba added the root Issue is related to stuff requiring root permissions or root-packages. label May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Something is not working properly. root Issue is related to stuff requiring root permissions or root-packages.
Projects
None yet
Development

No branches or pull requests

2 participants