Browse Source

add warning about greater than 60s RFC violation

Benjamin Brittain 2 years ago
parent
commit
af39d86faa
1 changed files with 3 additions and 0 deletions
  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")]
     #[cfg(feature = "proto-sixlowpan-fragmentation")]
     pub fn sixlowpan_fragments_cache_timeout(mut self, timeout: Duration) -> Self {
     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.sixlowpan_fragments_cache_timeout = timeout;
         self
         self
     }
     }