bgpd: Deprecate some unused BGP stuff

* BGP optional parameter type (Authentication)
* BGP UPDATE message error subcode for AS loop

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
Donatas Abraitis 2023-01-06 15:06:38 +02:00
parent 329dc20704
commit db3f8f3199
3 changed files with 2 additions and 20 deletions

View file

@ -144,7 +144,6 @@ static const struct message bgp_notify_open_msg[] = {
{BGP_NOTIFY_OPEN_BAD_PEER_AS, "/Bad Peer AS"},
{BGP_NOTIFY_OPEN_BAD_BGP_IDENT, "/Bad BGP Identifier"},
{BGP_NOTIFY_OPEN_UNSUP_PARAM, "/Unsupported Optional Parameter"},
{BGP_NOTIFY_OPEN_AUTH_FAILURE, "/Authentication Failure"},
{BGP_NOTIFY_OPEN_UNACEP_HOLDTIME, "/Unacceptable Hold Time"},
{BGP_NOTIFY_OPEN_UNSUP_CAPBL, "/Unsupported Capability"},
{BGP_NOTIFY_OPEN_ROLE_MISMATCH, "/Role Mismatch"},
@ -158,7 +157,6 @@ static const struct message bgp_notify_update_msg[] = {
{BGP_NOTIFY_UPDATE_ATTR_FLAG_ERR, "/Attribute Flags Error"},
{BGP_NOTIFY_UPDATE_ATTR_LENG_ERR, "/Attribute Length Error"},
{BGP_NOTIFY_UPDATE_INVAL_ORIGIN, "/Invalid ORIGIN Attribute"},
{BGP_NOTIFY_UPDATE_AS_ROUTE_LOOP, "/AS Routing Loop"},
{BGP_NOTIFY_UPDATE_INVAL_NEXT_HOP, "/Invalid NEXT_HOP Attribute"},
{BGP_NOTIFY_UPDATE_OPT_ATTR_ERR, "/Optional Attribute Error"},
{BGP_NOTIFY_UPDATE_INVAL_NETWORK, "/Invalid Network Field"},

View file

@ -1129,13 +1129,6 @@ static int bgp_capability_parse(struct peer *peer, size_t length,
return 0;
}
static int bgp_auth_parse(struct peer *peer, size_t length)
{
bgp_notify_send(peer, BGP_NOTIFY_OPEN_ERR,
BGP_NOTIFY_OPEN_AUTH_FAILURE);
return -1;
}
static bool strict_capability_same(struct peer *peer)
{
int i, j;
@ -1339,17 +1332,11 @@ int bgp_open_option_parse(struct peer *peer, uint16_t length,
zlog_debug(
"%s rcvd OPEN w/ optional parameter type %u (%s) len %u",
peer->host, opt_type,
opt_type == BGP_OPEN_OPT_AUTH
? "Authentication"
: opt_type == BGP_OPEN_OPT_CAP
? "Capability"
: "Unknown",
opt_type == BGP_OPEN_OPT_CAP ? "Capability"
: "Unknown",
opt_length);
switch (opt_type) {
case BGP_OPEN_OPT_AUTH:
ret = bgp_auth_parse(peer, opt_length);
break;
case BGP_OPEN_OPT_CAP:
ret = bgp_capability_parse(peer, opt_length,
mp_capability, &error);

View file

@ -1887,7 +1887,6 @@ struct bgp_nlri {
#define BGP_MSG_ROUTE_REFRESH_OLD 128
/* BGP open optional parameter. */
#define BGP_OPEN_OPT_AUTH 1
#define BGP_OPEN_OPT_CAP 2
/* BGP4 attribute type codes. */
@ -1952,7 +1951,6 @@ struct bgp_nlri {
#define BGP_NOTIFY_OPEN_BAD_PEER_AS 2
#define BGP_NOTIFY_OPEN_BAD_BGP_IDENT 3
#define BGP_NOTIFY_OPEN_UNSUP_PARAM 4
#define BGP_NOTIFY_OPEN_AUTH_FAILURE 5
#define BGP_NOTIFY_OPEN_UNACEP_HOLDTIME 6
#define BGP_NOTIFY_OPEN_UNSUP_CAPBL 7
#define BGP_NOTIFY_OPEN_ROLE_MISMATCH 11
@ -1964,7 +1962,6 @@ struct bgp_nlri {
#define BGP_NOTIFY_UPDATE_ATTR_FLAG_ERR 4
#define BGP_NOTIFY_UPDATE_ATTR_LENG_ERR 5
#define BGP_NOTIFY_UPDATE_INVAL_ORIGIN 6
#define BGP_NOTIFY_UPDATE_AS_ROUTE_LOOP 7
#define BGP_NOTIFY_UPDATE_INVAL_NEXT_HOP 8
#define BGP_NOTIFY_UPDATE_OPT_ATTR_ERR 9
#define BGP_NOTIFY_UPDATE_INVAL_NETWORK 10