From a7f93f3e060fdb2dc7bf5ff4ed4563d4b689bc6c Mon Sep 17 00:00:00 2001 From: Denis Ovsienko Date: Tue, 18 Dec 2007 15:13:06 +0000 Subject: + fixed no_set_aspath_prepend() to correctly match existing "set" statement --- bgpd/ChangeLog | 6 ++++++ bgpd/bgp_routemap.c | 11 ++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'bgpd') diff --git a/bgpd/ChangeLog b/bgpd/ChangeLog index c1f12d67..3fa3837a 100644 --- a/bgpd/ChangeLog +++ b/bgpd/ChangeLog @@ -1,3 +1,9 @@ +2007-12-18 Denis Ovsienko + + * bgp_routemap.c: (no_set_aspath_prepend) This command cancelled + existing "set" command regardless if "no set" matched it or not. + Fixed. + 2007-11-13 Paul Jakma * bgp_main.c: Small fix, format string parameters should never diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index d51375b7..b246e2ab 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -3018,7 +3018,16 @@ DEFUN (no_set_aspath_prepend, "Prepend string for a BGP AS-path attribute\n" "Prepend to the as-path\n") { - return bgp_route_set_delete (vty, vty->index, "as-path prepend", NULL); + int ret; + char *str; + + if (argc == 0) + return bgp_route_set_delete (vty, vty->index, "as-path prepend", NULL); + + str = argv_concat (argv, argc, 0); + ret = bgp_route_set_delete (vty, vty->index, "as-path prepend", str); + XFREE (MTYPE_TMP, str); + return ret; } ALIAS (no_set_aspath_prepend, -- cgit v1.2.1