瀏覽代碼

add warning about greater than 60s RFC violation

Benjamin Brittain 2 年之前
父節點
當前提交
af39d86faa
共有 1 個文件被更改,包括 3 次插入0 次删除
  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
     }