Bug 265306 - sysutils/tmux: has tcsh send DNS query
Summary: sysutils/tmux: has tcsh send DNS query
Status: Closed DUPLICATE of bug 204429
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Mathieu Arnold
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-19 07:17 UTC by Tatsuki Makino
Modified: 2023-01-09 03:16 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (mat)


Attachments
experimental patch (621 bytes, patch)
2022-07-19 07:17 UTC, Tatsuki Makino
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tatsuki Makino 2022-07-19 07:17:12 UTC
Created attachment 235350 [details]
experimental patch

DNS server may receive DNS queries related to tmux.
The following is an excerpt from my ISC BIND log.

19-Jul-2022 15:54:30.421 client @0x803584960 ::1#59707 (tmux\(67594\).%0): view internal-in: query: tmux\(67594\).%0 IN A + (::1)
19-Jul-2022 15:54:30.421 client @0x803584960 ::1#60153 (tmux\(67594\).%0): view internal-in: query: tmux\(67594\).%0 IN AAAA + (::1)

This query seems to be sent when a user whose login shell is tcsh/csh creates a new pane of tmux.
This is probably related to the function getremotehost in /usr/src/contrib/tcsh/tc.func.c .

The patch is an experimental patch to stop this DNS query.
This patch misleads tcsh into thinking that tmux is an X server connecting to a unix domain socket :)
Comment 1 Herbert J. Skuhra 2022-07-19 08:26:59 UTC
The issue was discussed before:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204429
Comment 2 Tatsuki Makino 2022-07-19 08:56:39 UTC
(In reply to Herbert J. Skuhra from comment #1)

Then this report will be closed as a duplicate.

However, X server that use the /tmp/.X11-unix/X0 socket register :0 to utmp.
How about solving the problem by using a similar format? Since tmux also creates and uses sockets in /tmp/tmux-${uid}/*.
Comment 3 Herbert J. Skuhra 2022-07-19 09:45:10 UTC
As this also happens on NetBSD (9.99.98) maybe this should be discussed in a tcsh (or tmux) group/mailing list.
Comment 4 Tatsuki Makino 2023-01-09 03:16:56 UTC
This is already a known problem to many, and if the upstream does not fix, then this is probably the specification.
So I will close this as only a suggestion on how to fix this problem for those who are concerned about it.

*** This bug has been marked as a duplicate of bug 204429 ***