process_ipv4(): stub handled_by_raw_socket in absence of feature="socket-raw"

Closes: #295
Approved by: whitequark
v0.7.x
Astro 2019-05-08 21:43:16 +02:00 committed by Homu
parent 1276234e98
commit 69bc2de64c
1 changed files with 2 additions and 1 deletions

View File

@ -956,6 +956,8 @@ impl<'b, 'c, 'e> InterfaceInner<'b, 'c, 'e> {
#[cfg(feature = "socket-raw")]
let handled_by_raw_socket = self.raw_socket_filter(sockets, &ip_repr, ip_payload);
#[cfg(not(feature = "socket-raw"))]
let handled_by_raw_socket = false;
if !self.has_ip_addr(ipv4_repr.dst_addr) &&
!ipv4_repr.dst_addr.is_broadcast() &&
@ -988,7 +990,6 @@ impl<'b, 'c, 'e> InterfaceInner<'b, 'c, 'e> {
IpProtocol::Tcp =>
self.process_tcp(sockets, timestamp, ip_repr, ip_payload),
#[cfg(feature = "socket-raw")]
_ if handled_by_raw_socket =>
Ok(Packet::None),