Improve graceful restart capability handling.
authorclaudio <claudio@openbsd.org>
Thu, 27 May 2021 07:52:54 +0000 (07:52 +0000)
committerclaudio <claudio@openbsd.org>
Thu, 27 May 2021 07:52:54 +0000 (07:52 +0000)
commitd10dbd9f44783fefb500012a1165c8ab2f19ee60
treee922e2ef83f0680fdd371846be8b6f39c92d4954
parent110edc0ba3375eb694ee2e87f05f8e9b321f7231
Improve graceful restart capability handling.

Announce only the graceful restart capability header but do not include any
AFI / SAFI pairs. bgpd does not preserve its forwarding state over restarts
and only implements the "Procedures for the Receiving Speaker".

When calculating the negotiated capabilities do not override the peer
capabilities (AFI / SAFI bits), just make sure the negotiated bits are
cleared. With this the peer capabilities are properly shown in bgpctl.
usr.sbin/bgpd/session.c