We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e000f15 commit 1510360Copy full SHA for 1510360
src/iface/interface/tcp.rs
@@ -1,6 +1,6 @@
1
use super::*;
2
3
-use crate::socket::tcp::Socket;
+use crate::{socket::raw::Socket as RawSocket, socket::tcp::Socket};
4
5
impl InterfaceInner {
6
pub(crate) fn process_tcp<'frame>(
@@ -29,6 +29,18 @@ impl InterfaceInner {
29
}
30
31
32
+ #[cfg(feature = "socket-raw")]
33
+ for raw_socket in sockets
34
+ .items_mut()
35
+ .filter_map(|i| RawSocket::downcast_mut(&mut i.socket))
36
+ {
37
+ // Stop if we find a raw socket accepting TCP.
38
+ if raw_socket.accepts(&ip_repr) {
39
+ // Payload will be processed by raw socket separately.
40
+ return None;
41
+ }
42
43
+
44
if tcp_repr.control == TcpControl::Rst
45
|| ip_repr.dst_addr().is_unspecified()
46
|| ip_repr.src_addr().is_unspecified()
0 commit comments