diff options
author | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-11-18 23:33:06 +0100 |
---|---|---|
committer | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-11-18 23:33:06 +0100 |
commit | 80314d87d176bbee63521f487d0dfd032a9cbffd (patch) | |
tree | e59f27e5ed0d8a52de5b2869d74fdd20cc21cb83 | |
parent | 9a00d1ba2c2c821b397a29fabd9ebec38a968e23 (diff) |
fix renew/rebind spam on successful renewal0.3.4
This fixes the state not being updated correctly when a Reply to a Renew or Rebind packet is received. It also fixes renewals not being written to disk.
-rw-r--r-- | Cargo.lock | 2 | ||||
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | src/client.rs | 7 |
3 files changed, 7 insertions, 4 deletions
@@ -384,7 +384,7 @@ dependencies = [ [[package]] name = "rsdsl_dhcp6" -version = "0.3.3" +version = "0.3.4" dependencies = [ "dhcproto", "rand", @@ -1,6 +1,6 @@ [package] name = "rsdsl_dhcp6" -version = "0.3.3" +version = "0.3.4" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/client.rs b/src/client.rs index 5d2fcdb..c5806dd 100644 --- a/src/client.rs +++ b/src/client.rs @@ -325,7 +325,11 @@ impl Dhcp6c { fn rr(&mut self, t1: Duration, t2: Duration, valid_lifetime: Duration) { match self.state { Dhcp6cState::Starting | Dhcp6cState::Opened => {} // illegal - Dhcp6cState::Soliciting | Dhcp6cState::Requesting | Dhcp6cState::Rerouting => { + Dhcp6cState::Soliciting + | Dhcp6cState::Requesting + | Dhcp6cState::Renewing + | Dhcp6cState::Rebinding + | Dhcp6cState::Rerouting => { self.upper_status_tx .send(true) .expect("upper status channel is closed"); @@ -339,7 +343,6 @@ impl Dhcp6c { self.state = Dhcp6cState::Opened; } - Dhcp6cState::Renewing | Dhcp6cState::Rebinding => self.state = Dhcp6cState::Opened, } } } |