Commit 8d37699
committed
BGP: Fix sessionEstablished flag not reset when transitioning to Idle state (#1050)
When BGP FSM transitions from any state to Idle state (due to timeouts,
connection failures, etc.), the sessionEstablished flag was not being
reset to false. This caused BgpRouter::updateSendProcess to continue
attempting to send update messages over closed TCP sockets, resulting
in "TcpSocket::send(): socket not connected or connecting, state is CLOSED"
errors.
This issue was particularly visible in simulations with 10+ BGP routers
where sessions would timeout (connectRetryTime = 120s) before completing
information exchange.
Fixed by ensuring sessionEstablished is set to false in all FSM state
transition functions that call setState<Idle>().
Fixes: BGP session timeout causing socket send errors1 parent 1463db0 commit 8d37699
1 file changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
| |||
153 | 154 | | |
154 | 155 | | |
155 | 156 | | |
| 157 | + | |
156 | 158 | | |
157 | 159 | | |
158 | 160 | | |
| |||
180 | 182 | | |
181 | 183 | | |
182 | 184 | | |
| 185 | + | |
| 186 | + | |
183 | 187 | | |
184 | 188 | | |
185 | 189 | | |
| |||
223 | 227 | | |
224 | 228 | | |
225 | 229 | | |
| 230 | + | |
226 | 231 | | |
227 | 232 | | |
228 | 233 | | |
| |||
240 | 245 | | |
241 | 246 | | |
242 | 247 | | |
| 248 | + | |
243 | 249 | | |
244 | 250 | | |
245 | 251 | | |
| |||
314 | 320 | | |
315 | 321 | | |
316 | 322 | | |
| 323 | + | |
317 | 324 | | |
318 | 325 | | |
319 | 326 | | |
| |||
330 | 337 | | |
331 | 338 | | |
332 | 339 | | |
| 340 | + | |
333 | 341 | | |
334 | 342 | | |
335 | 343 | | |
| |||
348 | 356 | | |
349 | 357 | | |
350 | 358 | | |
| 359 | + | |
| 360 | + | |
351 | 361 | | |
352 | 362 | | |
353 | 363 | | |
| |||
432 | 442 | | |
433 | 443 | | |
434 | 444 | | |
| 445 | + | |
435 | 446 | | |
436 | 447 | | |
437 | 448 | | |
| |||
448 | 459 | | |
449 | 460 | | |
450 | 461 | | |
| 462 | + | |
451 | 463 | | |
452 | 464 | | |
453 | 465 | | |
| |||
504 | 516 | | |
505 | 517 | | |
506 | 518 | | |
507 | | - | |
| |||
0 commit comments