gnoi
gnoi copied to clipboard
Update gNOI.bgp.proto
Current gNOI.BGP proto lacks guidance on how the ClearBGPNeighborRequest.Hard must be handled. As per RFC4486, code6 subcode 4,
If a BGP speaker decides to administratively reset the peering with a neighbor, then the speaker SHOULD send a NOTIFICATION message with the Error Code Cease and the Error Subcode "Administrative Reset".
which basically leaves implementations to make a choice if they should "reset TCP connection" and "Flush all routes OR not Flush all routes". Hence in rfc8538#section-3.2 for GR a new subcode 9 called HARD RESET
was introduced to clear such ambiguities so the GR process can be handled more predictively.
Having said that, the gNOI.ClearBGPNeighborRequest API must also have 2 options for reseting a TCP connection to match the RFC. The GRACEFUL
option introduced in this pull expects sending subcode 4 and the existing HARD
option expects sending subcode 9 so the GR behavior can be accurately handled by expecting implementations to flush routes post reseting the TCP connection.