We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b925c64 + a67cc2b commit f0789cfCopy full SHA for f0789cf
1 file changed
src/interface/windows.rs
@@ -60,8 +60,7 @@ fn get_mac_through_arp(src_ip: Ipv4Addr, dst_ip: Ipv4Addr) -> MacAddr {
60
&mut out_buf_len,
61
)
62
};
63
- if res == NO_ERROR {
64
- assert_eq!(out_buf_len, 6);
+ if res == NO_ERROR && out_buf_len == 6 {
65
MacAddr::from_octets(unsafe { target_mac_addr.assume_init() })
66
} else {
67
MacAddr::zero()
0 commit comments