]> git.proxmox.com Git - mirror_frr.git/commitdiff
Merge pull request #11013 from opensourcerouting/fix/convert_bgp_peer_sort_t_to_enum
authorRuss White <russ@riw.us>
Wed, 13 Apr 2022 18:52:58 +0000 (14:52 -0400)
committerGitHub <noreply@github.com>
Wed, 13 Apr 2022 18:52:58 +0000 (14:52 -0400)
bgpd: typedef enum to enum

1  2 
bgpd/bgp_vty.c

diff --combined bgpd/bgp_vty.c
index 2c407d9691735a5f46aa54a4934fdb85c68046a8,673b00109baafcb211cb84a1aa1b60918feb026c..2aa77576a1ab70df48e2211af32e55b775cc1e61
@@@ -934,12 -934,12 +934,12 @@@ static void bgp_clear_vty_error(struct 
        switch (error) {
        case BGP_ERR_AF_UNCONFIGURED:
                vty_out(vty,
 -                      "%%BGP: Enable %s address family for the neighbor %s\n",
 +                      "%% BGP: Enable %s address family for the neighbor %s\n",
                        get_afi_safi_str(afi, safi, false), peer->host);
                break;
        case BGP_ERR_SOFT_RECONFIG_UNCONFIGURED:
                vty_out(vty,
 -                      "%%BGP: Inbound soft reconfig for %s not possible as it\n      has neither refresh capability, nor inbound soft reconfig\n",
 +                      "%% BGP: Inbound soft reconfig for %s not possible as it\n      has neither refresh capability, nor inbound soft reconfig\n",
                        peer->host);
                break;
        default:
@@@ -1086,7 -1086,7 +1086,7 @@@ static int bgp_clear(struct vty *vty, s
                        peer = peer_lookup(bgp, &su);
                        if (!peer) {
                                vty_out(vty,
 -                                      "%%BGP: Unknown neighbor - \"%s\"\n",
 +                                      "%% BGP: Unknown neighbor - \"%s\"\n",
                                        arg);
                                return CMD_WARNING;
                        }
  
                group = peer_group_lookup(bgp, arg);
                if (!group) {
 -                      vty_out(vty, "%%BGP: No such peer-group %s\n", arg);
 +                      vty_out(vty, "%% BGP: No such peer-group %s\n", arg);
                        return CMD_WARNING;
                }
  
  
                if (!found)
                        vty_out(vty,
 -                              "%%BGP: No %s peer belonging to peer-group %s is configured\n",
 +                              "%% BGP: No %s peer belonging to peer-group %s is configured\n",
                                get_afi_safi_str(afi, safi, false), arg);
  
                return CMD_SUCCESS;
  
                if (!found)
                        vty_out(vty,
 -                              "%%BGP: No external %s peer is configured\n",
 +                              "%% BGP: No external %s peer is configured\n",
                                get_afi_safi_str(afi, safi, false));
  
                return CMD_SUCCESS;
  
                if (!found)
                        vty_out(vty,
 -                              "%%BGP: No %s peer is configured with AS %s\n",
 +                              "%% BGP: No %s peer is configured with AS %s\n",
                                get_afi_safi_str(afi, safi, false), arg);
  
                return CMD_SUCCESS;
@@@ -8700,7 -8700,7 +8700,7 @@@ DEFPY (af_rt_vpn_imexport
        int ret;
        struct ecommunity *ecom = NULL;
        int dodir[BGP_VPN_POLICY_DIR_MAX] = {0};
-       vpn_policy_direction_t dir;
+       enum vpn_policy_direction dir;
        afi_t afi;
        int idx = 0;
        bool yes = true;
@@@ -8780,7 -8780,7 +8780,7 @@@ DEFPY (af_route_map_vpn_imexport
        VTY_DECLVAR_CONTEXT(bgp, bgp);
        int ret;
        int dodir[BGP_VPN_POLICY_DIR_MAX] = {0};
-       vpn_policy_direction_t dir;
+       enum vpn_policy_direction dir;
        afi_t afi;
        int idx = 0;
        bool yes = true;
@@@ -8843,7 -8843,7 +8843,7 @@@ DEFPY(af_import_vrf_route_map, af_impor
        "name of route-map\n")
  {
        VTY_DECLVAR_CONTEXT(bgp, bgp);
-       vpn_policy_direction_t dir = BGP_VPN_POLICY_DIR_FROMVPN;
+       enum vpn_policy_direction dir = BGP_VPN_POLICY_DIR_FROMVPN;
        afi_t afi;
        struct bgp *bgp_default;
  
@@@ -8896,7 -8896,7 +8896,7 @@@ DEFPY(af_no_import_vrf_route_map, af_no
        "name of route-map\n")
  {
        VTY_DECLVAR_CONTEXT(bgp, bgp);
-       vpn_policy_direction_t dir = BGP_VPN_POLICY_DIR_FROMVPN;
+       enum vpn_policy_direction dir = BGP_VPN_POLICY_DIR_FROMVPN;
        afi_t afi;
  
        afi = vpn_policy_getafi(vty, bgp, true);
@@@ -9027,7 -9027,7 +9027,7 @@@ DEFPY (bgp_imexport_vpn
        int idx = 0;
        bool yes = true;
        int flag;
-       vpn_policy_direction_t dir;
+       enum vpn_policy_direction dir;
  
        if (argv_find(argv, argc, "no", &idx))
                yes = false;
@@@ -14626,7 -14626,7 +14626,7 @@@ static int bgp_show_route_leak_vty(stru
        char *vname;
        char buf1[INET6_ADDRSTRLEN];
        char *ecom_str;
-       vpn_policy_direction_t dir;
+       enum vpn_policy_direction dir;
  
        if (json) {
                json_object *json_import_vrfs = NULL;