Skip to content

Commit b9e79d1

Browse files
committedMar 6, 2017
Ignore Ethernet frames for which we aren't a destination.
1 parent bb2edf4 commit b9e79d1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎src/iface/ethernet.rs

+2
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ impl<'a, 'b, 'c, DeviceT: Device + 'a> Interface<'a, 'b, 'c, DeviceT> {
119119
let rx_buffer = try!(self.device.receive());
120120
let eth_frame = try!(EthernetFrame::new(&rx_buffer));
121121

122+
if eth_frame.dst_addr() != self.hardware_addr { return Ok(()) }
123+
122124
let mut response = Response::Nop;
123125
match eth_frame.ethertype() {
124126
// Snoop all ARP traffic, and respond to ARP packets directed at us.

0 commit comments

Comments
 (0)