Hi Glebs, thank you for bringing this to the discussion. I think that the intended behavior is clear, but the text can be further improved by appending it with "every time when the session reaches the Up state", or something along the line.
Regards, Greg On Fri, Sep 23, 2022, 15:07 Gļebs Ivanovskis <gl...@mikrotik.com> wrote: > Hi, > > I have a question regarding bfd.LocalDiag State Variable. In section > 6.8.1. State Variables > <https://www.rfc-editor.org/rfc/rfc5880.html#section-6.8.1> it says: > > bfd.LocalDiag > > The diagnostic code specifying the reason for the most recent > change in the local session state. This MUST be initialized to > zero (No Diagnostic). > > Then in many places throughout the text it is said that bfd.LocalDiag > needs to be set to other values in response to different failures. But > nowhere it is said that bfd.LocalDiag needs to be reset to "No Diagnostic". > Only the text I quoted above mentions bfd.LocalDiag together with "No > Diagnostic", but it talks only about BFD session initialization. > > So, if implementation rigorously follows the letter of RFC, then it leads > to a peculiar situation when a session goes back Up after, say, "Control > Detection Time Expired", but the Diag field of the packet keep holding the > diagnostic from the time session was Down. Or am I missing something? > > Best regards, > Glebs > >