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#2381 - Hostname variable is missing for the same machine on different interfaces #8221

Closed
openwrt-bot opened this issue Jul 11, 2019 · 9 comments
Labels

Comments

@openwrt-bot
Copy link

vinibali:

Hello,

an older Asus eeePC was just connected to the router using cable. Seconds later the wireless connection became alive as well.
On the DHCP leases I can see the 1 sec older entry for the wired connection, but shows no hostname.
The wireless connection's lease will expire 1 second later and has the hostname variable.
Is this function broken by design?

Regards

@openwrt-bot
Copy link
Author

vinibali:

screenshot attachment

@openwrt-bot
Copy link
Author

jow-:

Is the hostname present for both IPs in /var/dhcp.leases ?

@openwrt-bot
Copy link
Author

vinibali:

No

@openwrt-bot
Copy link
Author

jow-:

Then it seems to be either an issue with the DHCP client of this machine and/or with DNSmasq's handling of leases.

@openwrt-bot
Copy link
Author

ynezz:

Please try to reproduce it with the latest snapshot images, for details please follow https://openwrt.org/docs/guide-quick-start/developmentinstallation

@openwrt-bot
Copy link
Author

vinibali:

Hello Petr,

did you change anything on the code? Will the commit available on the 19.07 release as well? This my main router, I don't really want to spend my time with snapshots on it, but I'm planning to upgrade to the latest stable build if it's out.
DHCP server seems to get the hostname from "both" the clients:

Tue Jul 16 09:39:43 2019 daemon.info dnsmasq-dhcp[10524]: DHCPREQUEST(br-lan) 192.168.1.178 00:xx:xx:xx:xx:xx
Tue Jul 16 09:39:43 2019 daemon.info dnsmasq-dhcp[10524]: DHCPACK(br-lan) 192.168.1.178 00:xx:xx:xx:xx:xx archEEE900
.
Tue Jul 16 09:40:08 2019 daemon.info hostapd: wlan0: STA 00:xx:xx:xx:xx:xx IEEE 802.11: authenticated
Tue Jul 16 09:40:08 2019 daemon.info hostapd: wlan0: STA 00:xx:xx:xx:xx:xx IEEE 802.11: associated (aid 5)
Tue Jul 16 09:40:08 2019 daemon.notice hostapd: wlan0: AP-STA-CONNECTED 00:xx:xx:xx:xx:xx
Tue Jul 16 09:40:08 2019 daemon.info hostapd: wlan0: STA 00:xx:xx:xx:xx:xx WPA: pairwise key handshake completed (RSN)
Tue Jul 16 09:40:08 2019 daemon.info dnsmasq-dhcp[10524]: DHCPREQUEST(br-lan) 192.168.1.161 00:xx:xx:xx:xx:xx
Tue Jul 16 09:40:08 2019 daemon.info dnsmasq-dhcp[10524]: DHCPACK(br-lan) 192.168.1.161 00:xx:xx:xx:xx:xx archEEE900

Regards

@openwrt-bot
Copy link
Author

ynezz:

did you change anything on the code?

Nope, but there were a lot of changes in the dnsmasq package, which are available in the latest snapshot images:

* dnsmasq: move feature detection inside a shell func * dnsmasq: skip options that are not compiled in * package/dnsmasq: add max_ttl/min_cache_ttl/max_cache_ttl * dnsmasq: prefer localuse over resolvfile guesswork * dnsmasq: allow using dnsmasq as the sole resolver * dnsmasq: ensure test and rc order as older than final releases * dnsmasq: add rapid commit config option * dnsmasq: latest pre-2.81 patches * dnsmasq: allow building without tftp server support * dnsmasq: backport latest pre2.81 patches * dnsmasq: Fix dhcp-boot, dhcp-reply-delay and pxe-prompt regressions * dnsmasq: fix ipv6 ipset bug * dnsmasq: follow upstream dnsmasq pre-v2.81 v2 * Revert "dnsmasq: follow upstream dnsmasq pre-v2.81" * dnsmasq: follow upstream dnsmasq pre-v2.81 * dnsmasq: drop dnssec timestamp file patch * dnsmasq: tighten config file permissions * dnsmasq: bump to v2.80 * dnsmasq: fix dnsmasq failure to start when ujail'd * dnsmasq: bump to v2.80rc1 * dnsmasq: fix compile issue * dnsmasq: add dhcp-ignore-names support - CERT VU#598349 * dnsmasq: bump to v2.80test8 * dnsmasq: bump to v2.80test7 * dnsmasq: Change behavior when RD bit unset in queries. * dnsmasq: Handle memory allocation failure in make_non_terminals() * dnsmasq: bump to dnsmasq 2.80test6 * dnsmasq: allow dnsmasq variants to be included in image * dnsmasq: bump to dnsmasq v2.80test5 * dnsmasq: remove creation of /etc/ethers * dnsmasq: bump to dnsmasq v2.80test3 * dnsmasq: don't use network functions at boottime (FS#1542) * dnsmasq: bump to latest patches on 2.80rc2 * dnsmasq: fix dnsmasq startup issue * dnsmasq: fix confdir option processing (FS#1572) * Revert "dnsmasq: use "hostsdir" instead of "addn-hosts"" * dnsmasq: use "hostsdir" instead of "addn-hosts"

so it might be fixed already. If it's not fixed in the latest snapshots, then it's going to be broken in the 19.07 release as well. So if you can confirm, that the problem still exists in the snapshots, there might be some small chance (but still worth the effort), that someone would pick this up, fix it in master and backport this fix to 19.07 branch.

@openwrt-bot
Copy link
Author

vinibali:

I tested the latest snapshot version on a WDR4300, but it's still the same.

Regards

@openwrt-bot
Copy link
Author

yousong:

This should be by design of dnsmasq. Dnsmasq remembers hostname and answers name resolve request for those names. If I understand the dnsmasq code right, it "kills" existing lease's hostname when a newer lease has the same name.

I can only guess the intention is that the name is not for marking that lease is from a specific host, but to note that the name can be resolved to this ip. But maintainers of dnsmasq have the final say on the design and behavior ;)

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