]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Deprecate some unused BGP stuff
authorDonatas Abraitis <donatas@opensourcerouting.org>
Fri, 6 Jan 2023 13:06:38 +0000 (15:06 +0200)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Sat, 14 Jan 2023 19:30:35 +0000 (21:30 +0200)
* BGP optional parameter type (Authentication)
* BGP UPDATE message error subcode for AS loop

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
bgpd/bgp_debug.c
bgpd/bgp_open.c
bgpd/bgpd.h

index 9e540b63cbcd1a65e51f456b08808668c2c11f37..0b939f6acabc962d6035dcf9781c8947d4295d4f 100644 (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"},
index 79c54dd32d63da983a28dbde6dfd8b427a65b849..659e93bdfab9fb7c8f6d316a8ba9cf9706d72c33 100644 (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);
index 86979123146fa64519a300fb744bb6383c62345b..e4d04cd220a3c7a48d5f84dd93f403803c389c79 100644 (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