Skip to content

Commit

Permalink
Fail gracefully on attempts to connect to an unspecified IP address
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralith committed Dec 24, 2022
1 parent 2c6aa43 commit c0175e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion quinn-proto/src/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ impl Endpoint {
if self.is_full() {
return Err(ConnectError::TooManyConnections);
}
if remote.port() == 0 {
if remote.port() == 0 || remote.ip().is_unspecified() {
return Err(ConnectError::InvalidRemoteAddress(remote));
}

Expand Down

0 comments on commit c0175e7

Please sign in to comment.