aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimbeerserverDE <himbeerserverde@gmail.com>2023-11-06 14:25:27 +0100
committerHimbeerserverDE <himbeerserverde@gmail.com>2023-11-06 14:25:27 +0100
commit78e8f06fa97aa2ed0fd22354ae788c0509d95a80 (patch)
treeb0e3957cbbc94160a34fe6f52679f0ac8f01aa8d
parent1513de1a207bbd95d7440a4d71a09ad31e6d58ca (diff)
pppoe: set restart counter to -1 on all InitiationSent transitions
-rw-r--r--src/pppoe.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pppoe.rs b/src/pppoe.rs
index a617cd1..bd1eae0 100644
--- a/src/pppoe.rs
+++ b/src/pppoe.rs
@@ -189,6 +189,9 @@ impl PppoeClient {
| PppoeClientState::InitiationSent
| PppoeClientState::Active => {} // illegal
PppoeClientState::RequestSent => {
+ self.restart_timer.reset();
+ self.restart_counter = -1;
+
self.output_tx
.send(PppoePacket {
ty: PppoeType::Padi,
@@ -250,6 +253,7 @@ impl PppoeClient {
.expect("upper status channel is closed");
self.restart_timer.reset();
+ self.restart_counter = -1;
self.output_tx
.send(PppoePacket {