]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Temporary fix for BGP protocol capability announcement for IPv6 mode.
authorMartin Mares <mj@ucw.cz>
Sat, 22 Feb 2003 10:40:35 +0000 (10:40 +0000)
committerMartin Mares <mj@ucw.cz>
Sat, 22 Feb 2003 10:40:35 +0000 (10:40 +0000)
proto/bgp/packets.c

index ea980d11552788eb9a04c49d368e1e1d7cd5c477..bf893436792ad9a5ed435d1430cd81b7f6da1e40 100644 (file)
@@ -41,8 +41,22 @@ bgp_create_open(struct bgp_conn *conn, byte *buf)
   put_u16(buf+1, p->local_as);
   put_u16(buf+3, p->cf->hold_time);
   put_u32(buf+5, p->local_id);
+#ifndef IPV6
   buf[9] = 0;                          /* No optional parameters */
   return buf+10;
+#else
+  buf += 9;
+  *buf++ = 8;          /* Optional params len */
+  *buf++ = 2;          /* Option: Capability list */
+  *buf++ = 6;          /* Option length */
+  *buf++ = 1;          /* Capability 1: Multiprotocol extensions */
+  *buf++ = 4;          /* Capability data length */
+  *buf++ = 0;          /* We support AF IPv6 */
+  *buf++ = BGP_AF_IPV6;
+  *buf++ = 0;          /* RFU */
+  *buf++ = 1;          /* and SAFI 1 */
+  return buf;
+#endif
 }
 
 static unsigned int