Pārlūkot izejas kodu

Fix `buffer_len` for MLD

Thibaut Vandervelden 2 gadi atpakaļ
vecāks
revīzija
9ddb63a6e5
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      src/wire/mld.rs

+ 2 - 2
src/wire/mld.rs

@@ -340,8 +340,8 @@ impl<'a> Repr<'a> {
     /// Return the length of a packet that will be emitted from this high-level representation.
     pub fn buffer_len(&self) -> usize {
         match self {
-            Repr::Query { .. } => field::QUERY_NUM_SRCS.end,
-            Repr::Report { .. } => field::NR_MCAST_RCRDS.end,
+            Repr::Query { data, .. } => field::QUERY_NUM_SRCS.end + data.len(),
+            Repr::Report { data, .. } => field::NR_MCAST_RCRDS.end + data.len(),
         }
     }