Revert "bgpd: do not check attr in bgp_packet_attribute"

This reverts commit eb9e286511.

(cherry picked from commit e7c0191e82)
This commit is contained in:
Donald Sharp 2023-10-10 16:31:28 -04:00 committed by Mergify
parent 609ee2bd4b
commit a6f5a7aeef

View File

@ -4982,7 +4982,7 @@ bgp_size_t bgp_packet_attribute(struct bgp *bgp, struct peer *peer,
}
/* BGP Link-State */
if (attr->link_state) {
if (attr && attr->link_state) {
stream_putc(s, BGP_ATTR_FLAG_OPTIONAL);
stream_putc(s, BGP_ATTR_LINK_STATE);
stream_putc(s, attr->link_state->length);