From: Ondrej Zajicek Date: Thu, 8 Apr 2010 15:56:56 +0000 (+0200) Subject: Do not export empty community list attribute in BGP. X-Git-Tag: v1.2.2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b5a8649a48d7616efbc798095eee2c10563b4e6;p=thirdparty%2Fbird.git Do not export empty community list attribute in BGP. --- diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c index 9bcd4f884..c1b8fd1e7 100644 --- a/proto/bgp/attrs.c +++ b/proto/bgp/attrs.c @@ -515,6 +515,10 @@ bgp_encode_attrs(struct bgp_proto *p, byte *w, ea_list *attrs, int remains) flags = a->flags & (BAF_OPTIONAL | BAF_TRANSITIVE | BAF_PARTIAL); len = bgp_get_attr_len(a); + /* Skip empty int sets */ + if (((a->type & EAF_TYPE_MASK) == EAF_TYPE_INT_SET) && (len == 0)) + continue; + if (remains < len + 4) goto err_no_buffer;