Commit 6b5a8649 authored by Ondřej Zajíček's avatar Ondřej Zajíček

Do not export empty community list attribute in BGP.

parent 0277cc0b
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment