Conversation
Local (RFC1918) addresses weren't resolving on real hosts even though 'dig -x' resolved them. Cause: socket.gethostbyaddr() goes through NSS and, on systemd-resolved hosts, the 127.0.0.53 stub doesn't forward reverse lookups for private ranges to the upstream resolver by default. Query the nameservers from /etc/resolv.conf directly with dnspython (like dig -x), falling back to gethostbyaddr if dnspython is missing. This resolves local and public addresses alike; results stay cached in-process. - Add dnspython dependency; bundle dns.* in the PyInstaller spec - Document the resolver behavior in the README - Bump version to 0.2.2
The smoke->fire legend sat directly under the last heatmap row. Pad with blank lines so it anchors to the bottom of the tab, and center it horizontally to the widget width (manual space prefix, since an appended child Text's justify doesn't propagate to the parent). Regenerate drops screenshot.
Replace the 4-char single-color swatch with the complete smoke->fire gradient (one swatch per ramp color, 0 -> peak), so the legend maps every color the cells can take. Regenerate drops screenshot.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
v0.2.2 — fix local (RFC1918) addresses not resolving in real mode.
The problem
Local addresses weren't resolving on a real host even though
dig -x <addr>resolved them against the same DNS server. Public addresses resolved fine.Root cause
socket.gethostbyaddr()goes through glibc NSS → thesystemd-resolvedstub at127.0.0.53, which by default does not forward reverse lookups for private (RFC1918) ranges to the upstream resolver.dig -xworks because it reads/etc/resolv.confand queries the nameservers directly, bypassing that stub. So fwtop's LAN addresses came back unresolved while public ones did not.The fix
Resolve PTR the way
dig -xdoes — query the nameservers in/etc/resolv.confdirectly with dnspython, falling back tosocket.gethostbyaddrif dnspython is unavailable. This resolves local and public addresses alike; results stay cached in-process so each address is looked up once.dnspython>=2.4,<3dependency; bundledns.*in the PyInstaller spec for the frozen binariesVerified
/etc/resolv.conf(a private resolver in the test environment — the exact scenario this fixes)1.1.1.1→one.one.one.one,9.9.9.9→dns9.quad9.net); unresolvable addresses return the raw IP; caching works; app smoke test passesNote: the reporter's specific address (
10.1.1.92) is on their network and can't be exercised from CI, but the new path is exactly what makesdig -xsucceed against their resolver.