Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a3a6565

Browse files
committedOct 24, 2017
Dump malformed ingress packets at DEBUG log level.
1 parent 8ee2f7b commit a3a6565

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎src/iface/ethernet.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ impl<'a, 'b, 'c, DeviceT: Device + 'a> Interface<'a, 'b, 'c, DeviceT> {
175175
Ok(response) => response,
176176
Err(err) => {
177177
net_debug!("cannot process ingress packet: {}", err);
178+
net_debug!("packet dump follows:\n{}");
178179
return Err(err)
179180
}
180181
};
@@ -274,7 +275,7 @@ impl<'a, 'b, 'c, DeviceT: Device + 'a> Interface<'a, 'b, 'c, DeviceT> {
274275
&source_hardware_addr);
275276
} else {
276277
// Discard packets with non-unicast source addresses.
277-
net_debug!("non-unicast source in {}", arp_repr);
278+
net_debug!("non-unicast source address");
278279
return Err(Error::Malformed)
279280
}
280281

@@ -305,7 +306,7 @@ impl<'a, 'b, 'c, DeviceT: Device + 'a> Interface<'a, 'b, 'c, DeviceT> {
305306

306307
if !ipv4_repr.src_addr.is_unicast() {
307308
// Discard packets with non-unicast source addresses.
308-
net_debug!("non-unicast source in {}", ipv4_repr);
309+
net_debug!("non-unicast source address");
309310
return Err(Error::Malformed)
310311
}
311312

0 commit comments

Comments
 (0)
Please sign in to comment.