[inetstack] Bug Fix: Accept Ethernet multicast packets.
@@ -565,10 +565,11 @@ impl InetStack {
timer!("inetstack::engine::receive");
let (header, payload) = Ethernet2Header::parse(bytes)?;
debug!("Engine received {:?}", header);
- if self.local_link_addr != header.dst_addr() && !header.dst_addr().is_broadcast() {
- // ToDo: Add support for is_multicast() to MacAddress type. Then remove following trace and restore return.
- trace!("Need to add && !header.dst_addr().is_multicast()");
- //return Err(Fail::new(EINVAL, "physical destination address mismatch"));
+ if self.local_link_addr != header.dst_addr()
+ && !header.dst_addr().is_broadcast()
+ && !header.dst_addr().is_multicast()
+ {
+ return Err(Fail::new(EINVAL, "physical destination address mismatch"));
}
match header.ether_type() {
EtherType2::Arp => self.arp.receive(payload),
