ninenines / gun

HTTP/1.1, HTTP/2, Websocket client (and more) for Erlang/OTP.
ISC License
891 stars 232 forks source link

Fix infinite loop when connecting from a source in another subnet #289

Closed juantascon closed 2 years ago

juantascon commented 2 years ago

There's an infinite loop when trying to connect to an ip if you provide a source ip address in another subnet, this can be reproduced like this:

:gun_pool.request("GET", "/tmp1", [{"host", "20.20.0.1:8888"}], "", %{start_pool_if_missing: %{conn_opts: %{protocols: [:http2], tcp_opts: [ip: {127, 0, 0, 1}]}}})