Skip to content

Commit f0789cf

Browse files
authored
Merge pull request #131 from Le-Maz/main
fix: Replace hard assertion on SendARP output length with a regular check in the enclosing if statement
2 parents b925c64 + a67cc2b commit f0789cf

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/interface/windows.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ fn get_mac_through_arp(src_ip: Ipv4Addr, dst_ip: Ipv4Addr) -> MacAddr {
6060
&mut out_buf_len,
6161
)
6262
};
63-
if res == NO_ERROR {
64-
assert_eq!(out_buf_len, 6);
63+
if res == NO_ERROR && out_buf_len == 6 {
6564
MacAddr::from_octets(unsafe { target_mac_addr.assume_init() })
6665
} else {
6766
MacAddr::zero()

0 commit comments

Comments
 (0)