Revert "bgpd: do not check attr in bgp_packet_attribute"

This reverts commit eb9e286511.
This commit is contained in:
Donald Sharp 2023-10-10 16:31:28 -04:00
parent 73a4891ab3
commit e7c0191e82

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);