Explorar o código

add warning about greater than 60s RFC violation

Benjamin Brittain %!s(int64=2) %!d(string=hai) anos
pai
achega
af39d86faa
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      src/iface/interface.rs

+ 3 - 0
src/iface/interface.rs

@@ -400,6 +400,9 @@ let iface = builder.finalize(&mut device);
 
     #[cfg(feature = "proto-sixlowpan-fragmentation")]
     pub fn sixlowpan_fragments_cache_timeout(mut self, timeout: Duration) -> Self {
+        if timeout > Duration::from_secs(60) {
+            net_debug!("RFC 4944 specifies that the reassembly timeout MUST be set to a maximum of 60 seconds");
+        }
         self.sixlowpan_fragments_cache_timeout = timeout;
         self
     }