From 5d45fc544b533d1c5deb531e20be61e1e3aec6e2 Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Mon, 24 Jun 2019 06:39:50 +0000 Subject: mrt dumps lost communities after the community rewrite. Readd them by dumping them explicitly. Tested by and OK benno@ --- usr.sbin/bgpd/rde_attr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.sbin/bgpd/rde_attr.c') 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 @@ -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); } -- cgit v1.2.3