From 54896cbdba42a2ccd83c7f23c8ba14bed37a8b73 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Thu, 27 Apr 2000 22:31:11 +0000 Subject: Path attribute can be missing if we process a packet with empty NLRI section. --- proto/bgp/attrs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c index 74e2ef8..90da497 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; -- cgit v1.2.3