]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Do not export empty community list attribute in BGP.
authorOndrej Zajicek <santiago@crfreenet.org>
Thu, 8 Apr 2010 15:56:56 +0000 (17:56 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Thu, 8 Apr 2010 15:56:56 +0000 (17:56 +0200)
proto/bgp/attrs.c

index 9bcd4f884c0130666adaa22bfa97f26112519c25..c1b8fd1e7716ed8b80558f85da7e53f568f6d6c8 100644 (file)
@@ -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;