Skip to content

Commit 9b21c4e

Browse files
committed
fix: change byte parsing for IPv4
1 parent de3d8bc commit 9b21c4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

oryx-tui/src/dns.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fn get_hostname_v4(ip: &Ipv4Addr) -> AppResult<String> {
1717
sin_family: libc::AF_INET as u16,
1818
sin_port: 0,
1919
sin_addr: libc::in_addr {
20-
s_addr: ip.to_bits(),
20+
s_addr: u32::from_ne_bytes(ip.octets()),
2121
},
2222
sin_zero: [0; 8],
2323
};

0 commit comments

Comments
 (0)