diff options
| author | anlan_cs <vic.lan@pica8.com> | 2022-01-19 02:10:18 -0500 |
|---|---|---|
| committer | anlan_cs <vic.lan@pica8.com> | 2022-02-02 13:03:09 +0800 |
| commit | fd2109e5756b34141053188df25e3a20aa92764e (patch) | |
| tree | 26e7adaefafd95fe057234cbd07b92334f477cc2 /zebra/zebra_script.c | |
| parent | 9e84443acac051c31e504d8da657c2776332edf5 (diff) | |
bfdd: fix broken FSM in passive mode
Problem:
One is with active mode, the other is with passive mode. Sometimes
the one with active mode is in `Down` stauts, but the other one
with passive mode is unluckily stuck in `Init` status:
It doesn't answer its peer with any packets, even receiving continuous
`Down` packets.
Root Cause:
bfdd with passive mode answers its peer only *one* packet in `Down` status,
then it enters into `Init` status and ignores subsequent `Down` packets.
Unluckily that *one* answered packet is lost, at that moment its peer
with active mode can only have to send `Down` packets.
Fix:
1) With passive mode, bfdd should start xmittimer after received `Down` packet.
Refer to RFC5880:
"A system taking the Passive role MUST NOT begin sending BFD packets for
a particular session until it has received a BFD packet for that session, and
thus has learned the remote system's discriminator value."
2) Currently this added xmittimer for passive mode can be safely removed
except receiving `AdminDown` packet:
- `bfd_session_enable/bfd_set_passive_mode` doesn't start xmittimer
- `ptm_bfd_sess_dn/bfd_set_shutdown` can remove xmittimer
Per RFC5880, receiving `AdminDown` packet should be also regarded as `Down`,
so just call `ptm_bfd_sess_dn`, which will safely remove the added xmittimer
for passive mode. In summary, call `ptm_bfd_sess_dn` for two status changes
on receiving `AdminDown`: `Init`->`Down` and `Up`->`Down`.
Signed-off-by: anlan_cs <vic.lan@pica8.com>
Diffstat (limited to 'zebra/zebra_script.c')
0 files changed, 0 insertions, 0 deletions
