quagga: Fix "match peer local" statements parsing
authorVasilis Tsiligiannis <acinonyx@openwrt.gr>
Fri, 13 Jul 2012 16:35:00 +0000 (16:35 +0000)
committerVasilis Tsiligiannis <acinonyx@openwrt.gr>
Fri, 13 Jul 2012 16:35:00 +0000 (16:35 +0000)
SVN-Revision: 32694

net/quagga/patches/003-bgpd-fix-route-map-match-peer-local.patch [new file with mode: 0644]

diff --git a/net/quagga/patches/003-bgpd-fix-route-map-match-peer-local.patch b/net/quagga/patches/003-bgpd-fix-route-map-match-peer-local.patch
new file mode 100644 (file)
index 0000000..597ab73
--- /dev/null
@@ -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,