summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde_attr.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2019-06-24 06:39:50 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2019-06-24 06:39:50 +0000
commit5d45fc544b533d1c5deb531e20be61e1e3aec6e2 (patch)
tree4a9b536356555ddc23ce0c0f6bab7c5ffce7ede6 /usr.sbin/bgpd/rde_attr.c
parent8cb278be7438df8946957da8bd414d818d9fbf58 (diff)
mrt dumps lost communities after the community rewrite.
Readd them by dumping them explicitly. Tested by and OK benno@
Diffstat (limited to 'usr.sbin/bgpd/rde_attr.c')
-rw-r--r--usr.sbin/bgpd/rde_attr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/rde_attr.c b/usr.sbin/bgpd/rde_attr.c
index 95934519a1e..3aaf51bbd1a 100644
--- a/usr.sbin/bgpd/rde_attr.c
+++ b/usr.sbin/bgpd/rde_attr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_attr.c,v 1.122 2019/06/17 11:02:19 claudio Exp $ */
+/* $OpenBSD: rde_attr.c,v 1.123 2019/06/24 06:39:49 claudio Exp $ */
/*
* Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org>
@@ -86,7 +86,7 @@ attr_writebuf(struct ibuf *buf, u_int8_t flags, u_int8_t type, void *data,
if (ibuf_add(buf, hdr, flags & ATTR_EXTLEN ? 4 : 3) == -1)
return (-1);
- if (ibuf_add(buf, data, data_len) == -1)
+ if (data && ibuf_add(buf, data, data_len) == -1)
return (-1);
return (0);
}