diff options
author | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-07-29 14:14:26 +0200 |
---|---|---|
committer | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-07-29 14:14:26 +0200 |
commit | af85ec8b1b73318b75f68db286b387a47be1cff8 (patch) | |
tree | 8085add3d59bc3b66d42b82c1a32497ec4ad1ac5 | |
parent | 30ca5caf10fd28f9c6b157d781742fbb7b3ae04a (diff) |
ignore lcp configure-naks with wrong identifier
-rw-r--r-- | src/main.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 914dbfe..1b40b80 100644 --- a/src/main.rs +++ b/src/main.rs @@ -536,7 +536,9 @@ fn handle_lcp(lcp: LcpPkt, ctl_w: &mut BufWriter<File>, state: Arc<Mutex<Ppp>>) let mut state = state.lock().expect("ppp state mutex is poisoned"); match *state { - Ppp::Synchronize(identifier, old_mru, old_magic_number, attempt) => { + Ppp::Synchronize(identifier, old_mru, old_magic_number, attempt) + if lcp.identifier == identifier => + { *state = Ppp::Synchronize( identifier, mru.unwrap_or(old_mru), @@ -544,7 +546,9 @@ fn handle_lcp(lcp: LcpPkt, ctl_w: &mut BufWriter<File>, state: Arc<Mutex<Ppp>>) attempt, ) } - Ppp::SyncAck(identifier, old_mru, old_magic_number, attempt) => { + Ppp::SyncAck(identifier, old_mru, old_magic_number, attempt) + if lcp.identifier == identifier => + { *state = Ppp::SyncAck( identifier, mru.unwrap_or(old_mru), |