From e7c0191e820d7a57370ed11434a79f3a65e49b57 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 10 Oct 2023 16:31:28 -0400 Subject: [PATCH] Revert "bgpd: do not check attr in bgp_packet_attribute" This reverts commit eb9e2865116777661c44963769c1a5fed764b7f9. --- bgpd/bgp_attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index 05cf63e053..cc7afbe74f 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -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);