summaryrefslogtreecommitdiffstats
path: root/proto/bgp/attrs.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2010-04-08 17:56:56 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2010-04-08 17:56:56 +0200
commit6b5a8649a48d7616efbc798095eee2c10563b4e6 (patch)
tree371f9faa37975c15a5f7a6843f1e7844c75b2461 /proto/bgp/attrs.c
parent0277cc0baf1439a779f4c3ed8b2a77f29f5cfed7 (diff)
downloadbird-6b5a8649a48d7616efbc798095eee2c10563b4e6.tar
bird-6b5a8649a48d7616efbc798095eee2c10563b4e6.zip
Do not export empty community list attribute in BGP.
Diffstat (limited to 'proto/bgp/attrs.c')
-rw-r--r--proto/bgp/attrs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c
index 9bcd4f8..c1b8fd1 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;