Propagate the OS assigned port value (fixes LocalPort 0) - #87
Propagate the OS assigned port value (fixes LocalPort 0)#87zeroSteiner wants to merge 3 commits into
Conversation
|
core change in local.rb looks right, gating the localport update in the else branch means it only runs after a successful bind, and the specs check out for both tcp server and udp. one thing I couldn't figure out though proxies.rb only has also since proxies.rb is touched, should there be a spec for LocalPort 0 going through a proxy too, or are the two direct-bind specs enough for what this PR is trying to fix? asking because rapid7/metasploit-framework#21604 depends on this landing, wanted to actually understand what's changing before that work gets built on top of it |
Propagate the OS-assigned port value. This means when LocalPort is 0, you get the value that the OS assigned.
See this comment for context rapid7/metasploit-framework#21604 (comment)