]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_routemap.c
Merge pull request #3394 from karamalla0406/frr3360
[mirror_frr.git] / bgpd / bgp_routemap.c
index ca0291d0a1884ff7a932e42a31366a7b3174e61c..fc27c546b464be1206d0405e27737013c131a10d 100644 (file)
@@ -1717,7 +1717,7 @@ static route_map_result_t route_set_community(void *rule,
                        attr->community = NULL;
                        /* See the longer comment down below. */
                        if (old && old->refcnt == 0)
-                               community_free(old);
+                               community_free(&old);
                        return RMAP_OKAY;
                }
 
@@ -1726,7 +1726,7 @@ static route_map_result_t route_set_community(void *rule,
                        merge = community_merge(community_dup(old), rcs->com);
 
                        new = community_uniq_sort(merge);
-                       community_free(merge);
+                       community_free(&merge);
                } else
                        new = community_dup(rcs->com);
 
@@ -1736,7 +1736,7 @@ static route_map_result_t route_set_community(void *rule,
                 * Really need to cleanup attribute caching sometime.
                 */
                if (old && old->refcnt == 0)
-                       community_free(old);
+                       community_free(&old);
 
                /* will be interned by caller if required */
                attr->community = new;
@@ -1790,7 +1790,7 @@ static void route_set_community_free(void *rule)
        struct rmap_com_set *rcs = rule;
 
        if (rcs->com)
-               community_free(rcs->com);
+               community_free(&rcs->com);
        XFREE(MTYPE_ROUTE_MAP_COMPILED, rcs);
 }
 
@@ -2031,7 +2031,7 @@ static route_map_result_t route_set_community_delete(
                        merge = community_list_match_delete(community_dup(old),
                                                            list);
                        new = community_uniq_sort(merge);
-                       community_free(merge);
+                       community_free(&merge);
 
                        /* HACK: if the old community is not intern'd,
                         * we should free it here, or all reference to it may be
@@ -2039,13 +2039,13 @@ static route_map_result_t route_set_community_delete(
                         * Really need to cleanup attribute caching sometime.
                         */
                        if (old->refcnt == 0)
-                               community_free(old);
+                               community_free(&old);
 
                        if (new->size == 0) {
                                path->attr->community = NULL;
                                path->attr->flag &=
                                        ~ATTR_FLAG_BIT(BGP_ATTR_COMMUNITIES);
-                               community_free(new);
+                               community_free(&new);
                        } else {
                                path->attr->community = new;
                                path->attr->flag |=
@@ -3438,7 +3438,7 @@ DEFUN (no_match_evpn_route_type,
 
 DEFUN (match_evpn_vni,
        match_evpn_vni_cmd,
-       "match evpn vni (1-16777215)",
+       "match evpn vni " CMD_VNI_RANGE,
        MATCH_STR
        EVPN_HELP_STR
        "Match VNI\n"
@@ -3450,7 +3450,7 @@ DEFUN (match_evpn_vni,
 
 DEFUN (no_match_evpn_vni,
        no_match_evpn_vni_cmd,
-       "no match evpn vni (1-16777215)",
+       "no match evpn vni " CMD_VNI_RANGE,
        NO_STR
        MATCH_STR
        EVPN_HELP_STR
@@ -4076,6 +4076,11 @@ DEFUN (no_set_aspath_exclude,
        return ret;
 }
 
+ALIAS(no_set_aspath_exclude, no_set_aspath_exclude_all_cmd,
+      "no set as-path exclude",
+      NO_STR SET_STR
+      "Transform BGP AS_PATH attribute\n"
+      "Exclude from the as-path\n")
 
 DEFUN (set_community,
        set_community_cmd,
@@ -4171,7 +4176,7 @@ DEFUN (set_community,
                ret = generic_set_add(vty, VTY_GET_CONTEXT(route_map_index),
                                      "community", str);
 
-       community_free(com);
+       community_free(&com);
 
        return ret;
 }
@@ -4965,6 +4970,7 @@ void bgp_route_map_init(void)
        install_element(RMAP_NODE, &set_aspath_exclude_cmd);
        install_element(RMAP_NODE, &no_set_aspath_prepend_cmd);
        install_element(RMAP_NODE, &no_set_aspath_exclude_cmd);
+       install_element(RMAP_NODE, &no_set_aspath_exclude_all_cmd);
        install_element(RMAP_NODE, &set_origin_cmd);
        install_element(RMAP_NODE, &no_set_origin_cmd);
        install_element(RMAP_NODE, &set_atomic_aggregate_cmd);