diff options
author | Jorge Boncompte [DTI2] <jorge@dti2.net> | 2012-04-13 13:46:08 +0200 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2012-05-02 17:03:27 +0200 |
commit | 4fe080d7ee4c924a962d14423d94b4b8d8aba110 (patch) | |
tree | d1dab521b8d05a95dccf26628fcf5ed629b738e7 /bgpd/bgp_routemap.c | |
parent | bgpd, zebra: Fix format for some metric outputs (diff) | |
download | frr-4fe080d7ee4c924a962d14423d94b4b8d8aba110.tar.xz frr-4fe080d7ee4c924a962d14423d94b4b8d8aba110.zip |
bgpd: fix for route-maps with "match peer local" statements
A route-map with a 'match peer local' statement it's shown like
'match peer (null)' on config output...
... and it's unparsable on daemon startup.
Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'bgpd/bgp_routemap.c')
-rw-r--r-- | bgpd/bgp_routemap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index abb85fd21..f95cab130 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -172,7 +172,7 @@ route_match_peer_compile (const char *arg) su = XMALLOC (MTYPE_ROUTE_MAP_COMPILED, sizeof (union sockunion)); - ret = str2sockunion ( (arg)? arg : "0.0.0.0", su); + ret = str2sockunion (strcmp(arg, "local") ? arg : "0.0.0.0", su); if (ret < 0) { XFREE (MTYPE_ROUTE_MAP_COMPILED, su); return NULL; @@ -2430,7 +2430,7 @@ DEFUN (match_peer_local, "Match peer address\n" "Static or Redistributed routes\n") { - return bgp_route_match_add (vty, vty->index, "peer", NULL); + return bgp_route_match_add (vty, vty->index, "peer", "local"); } DEFUN (no_match_peer, |