[packages] quagga: Fix "match peer local" statements parsing
git-svn-id: svn+ssh://svn.openwrt.org/openwrt@32694 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
b7c84fab06
commit
6ee75f28c8
1 changed files with 20 additions and 0 deletions
20
patches/003-bgpd-fix-route-map-match-peer-local.patch
Normal file
20
patches/003-bgpd-fix-route-map-match-peer-local.patch
Normal file
|
@ -0,0 +1,20 @@
|
|||
--- a/bgpd/bgp_routemap.c
|
||||
+++ b/bgpd/bgp_routemap.c
|
||||
@@ -172,7 +172,7 @@ route_match_peer_compile (const char *ar
|
||||
|
||||
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,
|
Loading…
Reference in a new issue