summaryrefslogtreecommitdiff
path: root/proto
diff options
context:
space:
mode:
Diffstat (limited to 'proto')
-rw-r--r--proto/bgp/attrs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c
index a27871bc..35ae4704 100644
--- a/proto/bgp/attrs.c
+++ b/proto/bgp/attrs.c
@@ -653,6 +653,12 @@ bgp_format_tunnel_encap(eattr *a, byte *buf, uint size)
{
char *pos = buf;
+ if (a->u.ptr->length == 0)
+ {
+ bsprintf(pos, "");
+ return;
+ }
+
for (uint i = 0; i < a->u.ptr->length; i++)
{
if (size < 4)