]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_vty.c
Merge pull request #4496 from chiragshah6/evpn_dev2
[mirror_frr.git] / bgpd / bgp_vty.c
index ef7cf89450d68659b28a350eb8bedad205e8681f..6e0e079cd8a31ffaeeed0362c565b1c95bef0ade 100644 (file)
@@ -979,10 +979,6 @@ DEFUN_NOSH (router_bgp,
 
                ret = bgp_get(&bgp, &as, name, inst_type);
                switch (ret) {
-               case BGP_ERR_MULTIPLE_INSTANCE_NOT_SET:
-                       vty_out(vty,
-                               "Please specify 'bgp multiple-instance' first\n");
-                       return CMD_WARNING_CONFIG_FAILED;
                case BGP_ERR_AS_MISMATCH:
                        vty_out(vty, "BGP is already running; AS is %u\n", as);
                        return CMD_WARNING_CONFIG_FAILED;
@@ -4830,14 +4826,15 @@ static int peer_default_originate_set_vty(struct vty *vty, const char *peer_str,
 {
        int ret;
        struct peer *peer;
-       struct route_map *route_map;
+       struct route_map *route_map = NULL;
 
        peer = peer_and_group_lookup_vty(vty, peer_str);
        if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
        if (set) {
-               route_map = route_map_lookup_warn_noexist(vty, rmap);
+               if (rmap)
+                       route_map = route_map_lookup_warn_noexist(vty, rmap);
                ret = peer_default_originate_set(peer, afi, safi,
                                                 rmap, route_map);
        } else
@@ -7731,14 +7728,6 @@ DEFUN (show_bgp_memory,
                                     count * sizeof(struct peer_group)));
 
        /* Other */
-       if ((count = mtype_stats_alloc(MTYPE_HASH)))
-               vty_out(vty, "%ld hash tables, using %s of memory\n", count,
-                       mtype_memstr(memstrbuf, sizeof(memstrbuf),
-                                    count * sizeof(struct hash)));
-       if ((count = mtype_stats_alloc(MTYPE_HASH_BACKET)))
-               vty_out(vty, "%ld hash buckets, using %s of memory\n", count,
-                       mtype_memstr(memstrbuf, sizeof(memstrbuf),
-                                    count * sizeof(struct hash_bucket)));
        if ((count = mtype_stats_alloc(MTYPE_BGP_REGEXP)))
                vty_out(vty, "%ld compiled regexes, using %s of memory\n",
                        count, mtype_memstr(memstrbuf, sizeof(memstrbuf),
@@ -12329,7 +12318,7 @@ ALIAS_HIDDEN(
 
 DEFUN (no_bgp_redistribute_ipv4_ospf,
        no_bgp_redistribute_ipv4_ospf_cmd,
-       "no redistribute <ospf|table> (1-65535) [metric (0-4294967295)] [route-map WORD]",
+       "no redistribute <ospf|table> (1-65535) [{metric (0-4294967295)|route-map WORD}]",
        NO_STR
        "Redistribute information from another routing protocol\n"
        "Open Shortest Path First (OSPFv2)\n"
@@ -12357,7 +12346,7 @@ DEFUN (no_bgp_redistribute_ipv4_ospf,
 
 ALIAS_HIDDEN(
        no_bgp_redistribute_ipv4_ospf, no_bgp_redistribute_ipv4_ospf_hidden_cmd,
-       "no redistribute <ospf|table> (1-65535) [metric (0-4294967295)] [route-map WORD]",
+       "no redistribute <ospf|table> (1-65535) [{metric (0-4294967295)|route-map WORD}]",
        NO_STR
        "Redistribute information from another routing protocol\n"
        "Open Shortest Path First (OSPFv2)\n"
@@ -12370,7 +12359,7 @@ ALIAS_HIDDEN(
 
 DEFUN (no_bgp_redistribute_ipv4,
        no_bgp_redistribute_ipv4_cmd,
-       "no redistribute " FRR_IP_REDIST_STR_BGPD " [metric (0-4294967295)] [route-map WORD]",
+       "no redistribute " FRR_IP_REDIST_STR_BGPD " [{metric (0-4294967295)|route-map WORD}]",
        NO_STR
        "Redistribute information from another routing protocol\n"
        FRR_IP_REDIST_HELP_STR_BGPD
@@ -12394,7 +12383,7 @@ DEFUN (no_bgp_redistribute_ipv4,
 ALIAS_HIDDEN(
        no_bgp_redistribute_ipv4, no_bgp_redistribute_ipv4_hidden_cmd,
        "no redistribute " FRR_IP_REDIST_STR_BGPD
-       " [metric (0-4294967295)] [route-map WORD]",
+       " [{metric (0-4294967295)|route-map WORD}]",
        NO_STR
        "Redistribute information from another routing protocol\n" FRR_IP_REDIST_HELP_STR_BGPD
        "Metric for redistributed routes\n"
@@ -12553,7 +12542,7 @@ DEFUN (bgp_redistribute_ipv6_metric_rmap,
 
 DEFUN (no_bgp_redistribute_ipv6,
        no_bgp_redistribute_ipv6_cmd,
-       "no redistribute " FRR_IP6_REDIST_STR_BGPD " [metric (0-4294967295)] [route-map WORD]",
+       "no redistribute " FRR_IP6_REDIST_STR_BGPD " [{metric (0-4294967295)|route-map WORD}]",
        NO_STR
        "Redistribute information from another routing protocol\n"
        FRR_IP6_REDIST_HELP_STR_BGPD