Skip to content

Commit efcba2e

Browse files
authored
Merge pull request #1198 from sigvartmh/feat/gate-MLD-behind-multicast-feature
feat: gate MLD behind multicast feature
2 parents f676d39 + f878f18 commit efcba2e

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎src/iface/interface/ipv6.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,7 @@ impl InterfaceInner {
562562
))
563563
}
564564

565+
#[cfg(feature = "multicast")]
565566
pub(super) fn mldv2_report_packet<'any>(
566567
&self,
567568
records: &'any [MldAddressRecordRepr<'any>],

‎src/wire/icmpv6.rs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,7 @@ pub enum Repr<'a> {
605605
},
606606
#[cfg(any(feature = "medium-ethernet", feature = "medium-ieee802154"))]
607607
Ndisc(NdiscRepr<'a>),
608+
#[cfg(feature = "multicast")]
608609
Mld(MldRepr<'a>),
609610
#[cfg(feature = "proto-rpl")]
610611
Rpl(RplRepr<'a>),
@@ -698,6 +699,7 @@ impl<'a> Repr<'a> {
698699
}),
699700
#[cfg(any(feature = "medium-ethernet", feature = "medium-ieee802154"))]
700701
(msg_type, 0) if msg_type.is_ndisc() => NdiscRepr::parse(packet).map(Repr::Ndisc),
702+
#[cfg(feature = "multicast")]
701703
(msg_type, 0) if msg_type.is_mld() => MldRepr::parse(packet).map(Repr::Mld),
702704
#[cfg(feature = "proto-rpl")]
703705
(Message::RplControl, _) => RplRepr::parse(packet).map(Repr::Rpl),
@@ -720,6 +722,7 @@ impl<'a> Repr<'a> {
720722
}
721723
#[cfg(any(feature = "medium-ethernet", feature = "medium-ieee802154"))]
722724
&Repr::Ndisc(ndisc) => ndisc.buffer_len(),
725+
#[cfg(feature = "multicast")]
723726
&Repr::Mld(mld) => mld.buffer_len(),
724727
#[cfg(feature = "proto-rpl")]
725728
Repr::Rpl(rpl) => rpl.buffer_len(),
@@ -827,6 +830,7 @@ impl<'a> Repr<'a> {
827830
#[cfg(any(feature = "medium-ethernet", feature = "medium-ieee802154"))]
828831
Repr::Ndisc(ndisc) => ndisc.emit(packet),
829832

833+
#[cfg(feature = "multicast")]
830834
Repr::Mld(mld) => mld.emit(packet),
831835

832836
#[cfg(feature = "proto-rpl")]

‎src/wire/mld.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ impl<'a> Repr<'a> {
455455
}
456456
}
457457

458-
#[cfg(test)]
458+
#[cfg(all(test, feature = "multicast"))]
459459
mod test {
460460
use super::*;
461461
use crate::phy::ChecksumCapabilities;

0 commit comments

Comments
 (0)