Skip to content

Commit

Permalink
use constant Ipv4Addr::UNSPECIFIED as peer addr
Browse files Browse the repository at this point in the history
  • Loading branch information
Arian8j2 committed Oct 15, 2024
1 parent a4a4954 commit a3089ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions forwarder/src/peer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ impl Peer {

pub fn create_any_addr(is_ipv6: bool) -> SocketAddr {
if is_ipv6 {
SocketAddrV6::new(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 0), 0, 0, 0).into()
SocketAddrV6::new(Ipv6Addr::UNSPECIFIED, 0, 0, 0).into()
} else {
SocketAddrV4::new(Ipv4Addr::new(0, 0, 0, 0), 0).into()
SocketAddrV4::new(Ipv4Addr::UNSPECIFIED, 0).into()
}
}

Expand Down

0 comments on commit a3089ce

Please sign in to comment.