]> git.proxmox.com Git - mirror_frr.git/commit
bgpd: Handle route-refresh request received before EoR
authorXiao Liang <shaw.leon@gmail.com>
Wed, 14 Sep 2022 03:13:41 +0000 (11:13 +0800)
committerXiao Liang <shaw.leon@gmail.com>
Fri, 16 Sep 2022 10:26:21 +0000 (18:26 +0800)
commita783cc05f0870f686785edf0c4ca12fb6036716f
tree6c63f70e1c50b0dde3159b581ac2d7c22182a132
parenta05ae6c440131e7ef6db23e9738101495335175b
bgpd: Handle route-refresh request received before EoR

See the BGP message sequence:

    R1                  R2
    |      updates      |
    |------------------>|
    |                   |
    |  refresh request  |
    x<------------------|
    |                   |
    |   updates cont.   |
    |------------------>|
    |                   |
    |    end-of-rib     |
    |------------------>|
    |                   |

When R1 and R2 establish BGP session, R1 begins to send initial updates.
If R2 sends a route-refresh request before EoR, it's silently ignored
by R1, and routes received earlier have no chance to be processed again.

RFC7313 says, "for a BGP speaker that supports the BGP Graceful Restart,
it MUST NOT send a BoRR for an <AFI, SAFI> to a neighbor before it sends
the EoR for the <AFI, SAFI> to the neighbor." But it doesn't forbid
route-refresh request to be sent before receiving EoR.

To handle this scenario, postpone response to refresh request until EoR
is sent.

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
bgpd/bgp_packet.c
bgpd/bgpd.h