mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-23 10:11:53 +00:00
BGP: Update capability number from IANA for extended messages
This commit is contained in:
parent
71299a594d
commit
21745ff00e
@ -170,6 +170,14 @@ bgp_put_cap_rr(struct bgp_proto *p UNUSED, byte *buf)
|
||||
return buf;
|
||||
}
|
||||
|
||||
static byte *
|
||||
bgp_put_cap_ext_msg(struct bgp_proto *p UNUSED, byte *buf)
|
||||
{
|
||||
*buf++ = 6; /* Capability 6: Support for extended messages */
|
||||
*buf++ = 0; /* Capability data length */
|
||||
return buf;
|
||||
}
|
||||
|
||||
static byte *
|
||||
bgp_put_cap_gr1(struct bgp_proto *p, byte *buf)
|
||||
{
|
||||
@ -230,14 +238,6 @@ bgp_put_cap_err(struct bgp_proto *p UNUSED, byte *buf)
|
||||
return buf;
|
||||
}
|
||||
|
||||
static byte *
|
||||
bgp_put_cap_ext_msg(struct bgp_proto *p UNUSED, byte *buf)
|
||||
{
|
||||
*buf++ = 230; /* Capability TBD: Support for extended messages */
|
||||
*buf++ = 0; /* Capability data length */
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
||||
static byte *
|
||||
bgp_create_open(struct bgp_conn *conn, byte *buf)
|
||||
@ -834,6 +834,12 @@ bgp_parse_capabilities(struct bgp_conn *conn, byte *opt, int len)
|
||||
conn->peer_refresh_support = 1;
|
||||
break;
|
||||
|
||||
case 6: /* Extended message length capability, draft */
|
||||
if (cl != 0)
|
||||
goto err;
|
||||
conn->peer_ext_messages_support = 1;
|
||||
break;
|
||||
|
||||
case 64: /* Graceful restart capability, RFC 4724 */
|
||||
if (cl % 4 != 2)
|
||||
goto err;
|
||||
@ -874,12 +880,6 @@ bgp_parse_capabilities(struct bgp_conn *conn, byte *opt, int len)
|
||||
conn->peer_enhanced_refresh_support = 1;
|
||||
break;
|
||||
|
||||
case 230: /* Extended message length capability, draft, cap number TBD */
|
||||
if (cl != 0)
|
||||
goto err;
|
||||
conn->peer_ext_messages_support = 1;
|
||||
break;
|
||||
|
||||
/* We can safely ignore all other capabilities */
|
||||
}
|
||||
len -= 2 + cl;
|
||||
|
Loading…
Reference in New Issue
Block a user