diff options
author | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-07-29 23:00:57 +0200 |
---|---|---|
committer | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-07-29 23:00:57 +0200 |
commit | 0aaa5ba9f1f452b37feb1726bb9ef8f14c7d7f76 (patch) | |
tree | 26247adf6756f02d6fb51cd4af538fcebdeb4836 /src | |
parent | e36777ede6d725acff89475d9e46c2b9e21bc3ae (diff) |
don't ack ip(v6)cp configure-request while ncp state is dead
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index e805007..5533b12 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1181,7 +1181,7 @@ fn handle_ipcp( let mut ncp_states = ncp_states.lock().expect("ncp state mutex is poisoned"); match ncp_states[&Network::Ipv4] { - Ncp::Dead => {} // If peer sends a request before we do it's not unexpected. + Ncp::Dead => return Ok(()), // If peer sends a request before we do it's not unexpected. Ncp::Configure(identifier, attempt) => { *ncp_states.get_mut(&Network::Ipv4).expect("no ipv4 state") = Ncp::ConfAck(identifier, attempt) @@ -1362,7 +1362,7 @@ fn handle_ipv6cp( let mut ncp_states = ncp_states.lock().expect("ncp state mutex is poisoned"); match ncp_states[&Network::Ipv6] { - Ncp::Dead => {} // If peer sends a request before we do it's not unexpected. + Ncp::Dead => return Ok(()), // If peer sends a request before we do it's not unexpected. Ncp::Configure(identifier, attempt) => { *ncp_states.get_mut(&Network::Ipv6).expect("no ipv6 state") = Ncp::ConfAck(identifier, attempt) |