We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3988338 commit d3ca540Copy full SHA for d3ca540
src/iface/interface/multicast.rs
@@ -522,10 +522,13 @@ impl InterfaceInner {
522
max_resp_code,
523
..
524
} => {
525
- // Do not respont immediately to the query, but wait a random time
526
- let delay = crate::time::Duration::from_millis(
527
- (self.rand.rand_u16() % max_resp_code).into(),
528
- );
+ // Do not respond immediately to the query, but wait a random time
+ let delay = if max_resp_code > 0 {
+ (self.rand.rand_u16() % max_resp_code).into()
+ } else {
529
+ 0
530
+ };
531
+ let delay = crate::time::Duration::from_millis(delay);
532
// General query
533
if mcast_addr.is_unspecified()
534
&& (ip_repr.dst_addr == IPV6_LINK_LOCAL_ALL_NODES
0 commit comments