summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde_attr.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bgpd/rde_attr.c')
-rw-r--r--usr.sbin/bgpd/rde_attr.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/rde_attr.c b/usr.sbin/bgpd/rde_attr.c
index 02e9698dc0c..fc35e3cb05e 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.22 2004/03/12 18:09:23 claudio Exp $ */
+/* $OpenBSD: rde_attr.c,v 1.23 2004/03/12 21:14:35 claudio Exp $ */
/*
* Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org>
@@ -907,7 +907,10 @@ aspath_strlen(void *data, u_int16_t len)
seg_size = 2 + 2 * seg_len;
if (seg_type == AS_SET)
- total_size += 2;
+ if (total_size != 0)
+ total_size += 3;
+ else
+ total_size += 2;
else if (total_size != 0)
total_size += 1;