diff options
Diffstat (limited to 'bgpd/bgp_routemap.c')
-rw-r--r-- | bgpd/bgp_routemap.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index e8b9ad60..042620cf 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -1460,6 +1460,13 @@ route_set_community_delete (void *rule, struct prefix *prefix, new = community_uniq_sort (merge); community_free (merge); + /* HACK: if the old community is not intern'd, + * we should free it here, or all references to it may be lost. + * Really need to clean up attribute caching sometime. + */ + if (old->refcnt == 0) + community_free(old) ; + if (new->size == 0) { binfo->attr->community = NULL; @@ -2973,7 +2980,7 @@ DEFUN (set_metric, ALIAS (set_metric, set_metric_addsub_cmd, - "set metric <+/-metric>", + "set metric <-2147483647-+2147483647>", SET_STR "Metric value for destination routing protocol\n" "Add or subtract metric\n") @@ -3063,7 +3070,7 @@ ALIAS (no_set_weight, DEFUN (set_aspath_prepend, set_aspath_prepend_cmd, - "set as-path prepend ." CMD_AS_RANGE, + "set as-path prepend .ASNs", SET_STR "Transform BGP AS_PATH attribute\n" "Prepend to the as-path\n" @@ -3101,7 +3108,7 @@ DEFUN (no_set_aspath_prepend, ALIAS (no_set_aspath_prepend, no_set_aspath_prepend_val_cmd, - "no set as-path prepend ." CMD_AS_RANGE, + "no set as-path prepend .ASns", NO_STR SET_STR "Transform BGP AS_PATH attribute\n" @@ -3110,7 +3117,7 @@ ALIAS (no_set_aspath_prepend, DEFUN (set_aspath_exclude, set_aspath_exclude_cmd, - "set as-path exclude ." CMD_AS_RANGE, + "set as-path exclude .ASNs", SET_STR "Transform BGP AS-path attribute\n" "Exclude from the as-path\n" @@ -3147,7 +3154,7 @@ DEFUN (no_set_aspath_exclude, ALIAS (no_set_aspath_exclude, no_set_aspath_exclude_val_cmd, - "no set as-path exclude ." CMD_AS_RANGE, + "no set as-path exclude .ASNs", NO_STR SET_STR "Transform BGP AS_PATH attribute\n" @@ -3159,7 +3166,8 @@ DEFUN (set_community, "set community .AA:NN", SET_STR "BGP community attribute\n" - "Community number in aa:nn format or local-AS|no-advertise|no-export|internet or additive\n") + "Community number in aa:nn format or """ + "local-AS|no-advertise|no-export|internet or additive\n") { int i; int first = 0; |