Skip to content

Commit

Permalink
Ignore Ethernet frames for which we aren't a destination.
Browse files Browse the repository at this point in the history
whitequark committed Mar 6, 2017
1 parent bb2edf4 commit b9e79d1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/iface/ethernet.rs
Original file line number Diff line number Diff line change
@@ -119,6 +119,8 @@ impl<'a, 'b, 'c, DeviceT: Device + 'a> Interface<'a, 'b, 'c, DeviceT> {
let rx_buffer = try!(self.device.receive());
let eth_frame = try!(EthernetFrame::new(&rx_buffer));

if eth_frame.dst_addr() != self.hardware_addr { return Ok(()) }

let mut response = Response::Nop;
match eth_frame.ethertype() {
// Snoop all ARP traffic, and respond to ARP packets directed at us.

0 comments on commit b9e79d1

Please sign in to comment.