Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
labs
BIRD Internet Routing Daemon
Commits
52e21323
Commit
52e21323
authored
Nov 25, 2015
by
Ondřej Zajíček
Browse files
BGP: Update capability number from IANA for extended messages
parent
33b4f40a
Changes
1
Hide whitespace changes
Inline
Side-by-side
proto/bgp/packets.c
View file @
52e21323
...
@@ -163,6 +163,14 @@ bgp_put_cap_rr(struct bgp_proto *p UNUSED, byte *buf)
...
@@ -163,6 +163,14 @@ bgp_put_cap_rr(struct bgp_proto *p UNUSED, byte *buf)
return
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
*
static
byte
*
bgp_put_cap_gr1
(
struct
bgp_proto
*
p
,
byte
*
buf
)
bgp_put_cap_gr1
(
struct
bgp_proto
*
p
,
byte
*
buf
)
{
{
...
@@ -223,14 +231,6 @@ bgp_put_cap_err(struct bgp_proto *p UNUSED, byte *buf)
...
@@ -223,14 +231,6 @@ bgp_put_cap_err(struct bgp_proto *p UNUSED, byte *buf)
return
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
*
static
byte
*
bgp_create_open
(
struct
bgp_conn
*
conn
,
byte
*
buf
)
bgp_create_open
(
struct
bgp_conn
*
conn
,
byte
*
buf
)
...
@@ -827,6 +827,12 @@ bgp_parse_capabilities(struct bgp_conn *conn, byte *opt, int len)
...
@@ -827,6 +827,12 @@ bgp_parse_capabilities(struct bgp_conn *conn, byte *opt, int len)
conn
->
peer_refresh_support
=
1
;
conn
->
peer_refresh_support
=
1
;
break
;
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 */
case
64
:
/* Graceful restart capability, RFC 4724 */
if
(
cl
%
4
!=
2
)
if
(
cl
%
4
!=
2
)
goto
err
;
goto
err
;
...
@@ -867,12 +873,6 @@ bgp_parse_capabilities(struct bgp_conn *conn, byte *opt, int len)
...
@@ -867,12 +873,6 @@ bgp_parse_capabilities(struct bgp_conn *conn, byte *opt, int len)
conn
->
peer_enhanced_refresh_support
=
1
;
conn
->
peer_enhanced_refresh_support
=
1
;
break
;
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 */
/* We can safely ignore all other capabilities */
}
}
len
-=
2
+
cl
;
len
-=
2
+
cl
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment