<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">Apply by doing:
	cd /usr/src
	patch -p0 &lt; 010_bgpd.patch

And then rebuild and install bgpd:
	cd usr.sbin/bgpd
	make depend
	make
	make install

Index: usr.sbin/bgpd/rde_attr.c
===================================================================
RCS file: /cvs/src/usr.sbin/bgpd/rde_attr.c,v
retrieving revision 1.76
diff -u -p -r1.76 rde_attr.c
--- usr.sbin/bgpd/rde_attr.c	8 May 2008 09:51:46 -0000	1.76
+++ usr.sbin/bgpd/rde_attr.c	18 Feb 2009 20:02:41 -0000
@@ -832,6 +832,8 @@ aspath_prepend(struct aspath *asp, u_int
 		size = 0;
 	}
 
+	if (quantum &gt; 255)
+		fatalx("aspath_prepend: preposterous prepend");
 	if (quantum == 0) {
 		/* no change needed but return a copy */
 		p = malloc(asp-&gt;len);
@@ -843,7 +845,10 @@ aspath_prepend(struct aspath *asp, u_int
 	} else if (type == AS_SET || size + quantum &gt; 255) {
 		/* need to attach a new AS_SEQUENCE */
 		l = 2 + quantum * sizeof(u_int32_t) + asp-&gt;len;
-		overflow = type == AS_SET ? quantum : (size + quantum) &amp; 0xff;
+		if (type == AS_SET)
+			overflow = quantum;
+		else
+			overflow = size + quantum - 255;
 	} else
 		l = quantum * sizeof(u_int32_t) + asp-&gt;len;
 
</pre></body></html>