mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-09 20:01:10 +00:00
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>
This commit is contained in:
parent
ddc943dec3
commit
4fe080d7ee
@ -172,7 +172,7 @@ route_match_peer_compile (const char *arg)
|
|||||||
|
|
||||||
su = XMALLOC (MTYPE_ROUTE_MAP_COMPILED, sizeof (union sockunion));
|
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) {
|
if (ret < 0) {
|
||||||
XFREE (MTYPE_ROUTE_MAP_COMPILED, su);
|
XFREE (MTYPE_ROUTE_MAP_COMPILED, su);
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -2430,7 +2430,7 @@ DEFUN (match_peer_local,
|
|||||||
"Match peer address\n"
|
"Match peer address\n"
|
||||||
"Static or Redistributed routes\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,
|
DEFUN (no_match_peer,
|
||||||
|
Loading…
Reference in New Issue
Block a user