File tree 1 file changed +17
-0
lines changed
crates/lib-dhcp/src/client/state
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ pub enum DhcpState {
12
12
Rebinding ,
13
13
Bound ,
14
14
Renewing ,
15
+ RenewingSent ,
15
16
}
16
17
17
18
impl Default for DhcpState {
@@ -31,6 +32,7 @@ impl Display for DhcpState {
31
32
DhcpState :: Rebinding => write ! ( f, "REBINDING" ) ,
32
33
DhcpState :: Bound => write ! ( f, "BOUND" ) ,
33
34
DhcpState :: Renewing => write ! ( f, "RENEWING" ) ,
35
+ DhcpState :: RenewingSent => write ! ( f, "RENEWINGSENT" ) ,
34
36
}
35
37
}
36
38
}
@@ -152,6 +154,21 @@ impl DhcpStateMachine for Client {
152
154
}
153
155
_ => Err ( DhcpStateError :: new ( self . dhcp_state . clone ( ) , state) ) ,
154
156
} ,
157
+ DhcpState :: RenewingSent => match state {
158
+ next @ DhcpState :: Renewing => {
159
+ self . dhcp_state = next;
160
+ Ok ( ( ) )
161
+ }
162
+ next @ DhcpState :: Rebinding => {
163
+ self . dhcp_state = next;
164
+ Ok ( ( ) )
165
+ }
166
+ next @ DhcpState :: Bound => {
167
+ self . dhcp_state = next;
168
+ Ok ( ( ) )
169
+ }
170
+ _ => Err ( DhcpStateError :: new ( self . dhcp_state . clone ( ) , state) ) ,
171
+ } ,
155
172
}
156
173
}
157
174
}
You can’t perform that action at this time.
0 commit comments