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

Bug: when port is 0,will cause connection be override #162

Open
linpinger opened this issue Oct 21, 2021 · 0 comments
Open

Bug: when port is 0,will cause connection be override #162

linpinger opened this issue Oct 21, 2021 · 0 comments

Comments

@linpinger
Copy link

linpinger commented Oct 21, 2021

tcpip.go
line 114: addr := net.JoinHostPort(reqPayload.BindAddr, strconv.Itoa(int(reqPayload.BindPort)))

when BindPort = 0, bind will success, but port is changed to random

if there are more then 1 "tcpip-forward", h.forwards[addr] = ln will be override

i fork this lib and fix the bug https://github.com/linpinger/ssh/blob/master/tcpip.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant