Skip to content

Commit

Permalink
kitten @: Fix a regression connecting to TCP sockets using plain IP a…
Browse files Browse the repository at this point in the history
…ddresses rather than hostnames

Fixes #7794
  • Loading branch information
kovidgoyal committed Aug 27, 2024
1 parent 0515dc1 commit fdc3c3d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ Detailed list of changes

- Remote control: When listening on a UNIX domain socket only allow connections from processes having the same user id (:pull:`7777`)

- kitten @: Fix a regression connecting to TCP sockets using plain IP addresses rather than hostnames (:iss:`7794`)

0.36.1 [2024-08-24]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
4 changes: 3 additions & 1 deletion tools/cmd/at/socket_io.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,10 @@ func do_socket_io(io_data *rc_io_data) (serialized_response []byte, err error) {
}
defer f.Close()
} else {
conn, err = net.Dial(global_options.to_network, global_options.to_address)
network := utils.IfElse(global_options.to_network == "ip", "tcp", global_options.to_network)
conn, err = net.Dial(network, global_options.to_address)
if err != nil {
err = fmt.Errorf("Failed to connect to %s %s with error: %w", network, global_options.to_address, err)
return
}
}
Expand Down

0 comments on commit fdc3c3d

Please sign in to comment.