Rework parse_notification() to use the ibuf API for everything.
authorclaudio <claudio@openbsd.org>
Fri, 22 Mar 2024 07:19:28 +0000 (07:19 +0000)
committerclaudio <claudio@openbsd.org>
Fri, 22 Mar 2024 07:19:28 +0000 (07:19 +0000)
commitbeb044e94766735d8610d1d011f04e1adb25425d
treeb3cf3887ec3e85fab52ac1fff5dc6c05af7d06dc
parenta6ac7a8b64b691f0c7164abfad8061c6f87f7e30
Rework parse_notification() to use the ibuf API for everything.

While there fix the RFC5492 handling of ERR_OPEN_CAPA (the current code
has the logic inversed). ERR_OPEN_CAPA is there to signal that a needed
capability is missing in our OPEN message. Just add the handling of
ERR_OPEN_CAPA to log_notification().

Also rework the handling of the shutdown reason and move the printing
into log_notification().

OK tb@
usr.sbin/bgpd/bgpd.h
usr.sbin/bgpd/logmsg.c
usr.sbin/bgpd/session.c
usr.sbin/bgpd/session.h
usr.sbin/bgpd/util.c