From: Martin Mares Date: Thu, 27 Apr 2000 22:31:11 +0000 (+0000) Subject: Path attribute can be missing if we process a packet with empty NLRI section. X-Git-Tag: v1.3.2~1277 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=54896cbdba42a2ccd83c7f23c8ba14bed37a8b73;p=thirdparty%2Fbird.git Path attribute can be missing if we process a packet with empty NLRI section. --- diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c index 74e2ef8d8..90da497e6 100644 --- a/proto/bgp/attrs.c +++ b/proto/bgp/attrs.c @@ -828,8 +828,7 @@ bgp_decode_attrs(struct bgp_conn *conn, byte *attr, unsigned int len, struct lin /* If the AS path attribute contains our AS, reject the routes */ e = ea_find(a->eattrs, EA_CODE(EAP_BGP, BA_AS_PATH)); - ASSERT(e); - if (bgp_path_loopy(bgp, e)) + if (e && bgp_path_loopy(bgp, e)) { DBG("BGP: Path loop!\n"); return NULL;