Skip to content

Commit f107310

Browse files
adding method to retrieve recv hoplimit, and adding tests
1 parent fc7905d commit f107310

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/socket.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2043,7 +2043,7 @@ impl Socket {
20432043
pub fn recv_hoplimit_v6(&self) -> io::Result<bool> {
20442044
unsafe {
20452045
getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IPV6, sys::IPV6_RECVHOPLIMIT)
2046-
.map(|recv_tclass| recv_tclass > 0)
2046+
.map(|recv_hoplimit| recv_hoplimit > 0)
20472047
}
20482048
}
20492049
/// Set the value of the `IPV6_RECVHOPLIMIT` option for this socket.

0 commit comments

Comments
 (0)