mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
filter disallowed bindings for the TcpListener
This commit is contained in:
parent
81d5718f05
commit
f2193d64b1
1 changed files with 6 additions and 0 deletions
|
|
@ -27,6 +27,12 @@ pub(crate) fn std_tcp_listen(
|
|||
return;
|
||||
}
|
||||
};
|
||||
if address.as_bytes() != [0, 0, 0, 0]
|
||||
&& address.as_bytes() != [127, 0, 0, 1]
|
||||
&& address.as_bytes() != IPV4_ADDRESS.load(Ordering::SeqCst).to_be_bytes() {
|
||||
std_failure(msg, NetError::Invalid);
|
||||
return;
|
||||
}
|
||||
|
||||
let tcp_rx_buffer = TcpSocketBuffer::new(vec![0; TCP_BUFFER_SIZE]);
|
||||
let tcp_tx_buffer = TcpSocketBuffer::new(vec![0; TCP_BUFFER_SIZE]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue