termux-packages
termux-packages copied to clipboard
[Bug]: DNSMasq DHCP failure
Problem description
The DHCP server for dnsmasq is not working.
What steps will reproduce the bug?
- Turn off DHCP on the router to prevent other devices from obtaining IP addresses. Set my phone to a static IP to connect to WIFI.
apt install root-repo && apt install dnsmasq- The configuration file (/sdcard/dnsmasq/dnsmasq.conf) is:
# dnsmasq configuration file
conf-dir=/sdcard/dnsmasq/
dhcp-lease=/sdcard/dnsmasq/dnsmasq.leases
pid-file=/sdcard/dnsmasq/dnsmasq.pid
no-hosts
no-resolv
interface=wlan0
dhcp-authoritative
dhcp-range=192.168.0.100,192.168.0.200,255.255.255.0,48h
dhcp-option=3,192.168.0.1
dhcp-option=6,114.114.114.114,185.222.222.222
sudo dnsmasq -d -7 /sdcard/dnsmasq- dnsmasq started.
- Other devices in the same network segment still cannot obtain IP addresses.
- When I copy this configuration file to another Linux computer and use the same method to enable dnsmasq, other devices can obtain the IP address.
In summary, DNSMasq on Termux cannot utilize DHCP server functionality.
What is the expected behavior?
DHCP is available.
System information
Termux Variables:
TERMUX_APK_RELEASE=GITHUB
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=6012
TERMUX_IS_DEBUGGABLE_BUILD=1
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable main
# tur-repo (sources.list.d/tur.list)
deb https://tur.kcubeterm.com tur-packages tur tur-on-device tur-continuous
# root-repo (sources.list.d/root.list)
deb https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-root root stable
Updatable packages:
All packages up to date
termux-tools version:
1.43.3
Android version:
10
Kernel build information:
Linux localhost 4.14.141+ #1 SMP PREEMPT Fri Dec 23 12:01:31 CST 2022 aarch64 Android
Device manufacturer:
vivo
Device model:
V2061A
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so