Flagless host:port binds a server and silently discards the host
Milestone
Backlog
Labels
bug, P3-low, area/uds
Summary
A flagless host:port target that does not start with : is auto-classified as a server: con.cpp:591-593 sets srv_flag = true (the comment there reads "most probably client"), the server TCP branch binds INADDR_ANY and discards the host prefix. So con example.com:8080 opens a listening socket on 8080 rather than connecting outbound, contrary to the telnet host port / nc host port convention a user expects.
Root Cause
con.cpp:591-593 (comment-vs-code mismatch); server TCP branch drops the host (con.cpp:715, 734, 744).
Proposed Fix (decision needed)
Decide the default direction for a flagless contained-colon target: flip to client (matches convention; behavior change for an undocumented form), optionally with a one-line stderr note; or require explicit -c/-s. The leading-colon :port server form stays.
Acceptance Criteria
- The flagless
host:port behavior is defined intentionally and documented, not left as a comment/code contradiction.
Out of Scope
The UNIX-vs-TCP colon misrouting (M1/#4). M1 only aligns the comment to the current code; this issue decides whether the behavior itself should change.
Surfaced during the M1 (#4) review session, 2026-06-22.
Flagless host:port binds a server and silently discards the host
Milestone
Backlog
Labels
bug, P3-low, area/uds
Summary
A flagless
host:porttarget that does not start with:is auto-classified as a server:con.cpp:591-593setssrv_flag = true(the comment there reads "most probably client"), the server TCP branch bindsINADDR_ANYand discards thehostprefix. Socon example.com:8080opens a listening socket on 8080 rather than connecting outbound, contrary to thetelnet host port/nc host portconvention a user expects.Root Cause
con.cpp:591-593(comment-vs-code mismatch); server TCP branch drops the host (con.cpp:715,734,744).Proposed Fix (decision needed)
Decide the default direction for a flagless contained-colon target: flip to client (matches convention; behavior change for an undocumented form), optionally with a one-line stderr note; or require explicit
-c/-s. The leading-colon:portserver form stays.Acceptance Criteria
host:portbehavior is defined intentionally and documented, not left as a comment/code contradiction.Out of Scope
The UNIX-vs-TCP colon misrouting (M1/#4). M1 only aligns the comment to the current code; this issue decides whether the behavior itself should change.
Surfaced during the M1 (#4) review session, 2026-06-22.