[packages] quagga: Fix memleak with struct attr_extra
[openwrt/svn-archive/archive.git] / net / quagga / patches / 003-bgpd-fix-route-map-match-peer-local.patch
1 --- a/bgpd/bgp_routemap.c
2 +++ b/bgpd/bgp_routemap.c
3 @@ -172,7 +172,7 @@ route_match_peer_compile (const char *ar
4
5 su = XMALLOC (MTYPE_ROUTE_MAP_COMPILED, sizeof (union sockunion));
6
7 - ret = str2sockunion ( (arg)? arg : "0.0.0.0", su);
8 + ret = str2sockunion (strcmp(arg, "local") ? arg : "0.0.0.0", su);
9 if (ret < 0) {
10 XFREE (MTYPE_ROUTE_MAP_COMPILED, su);
11 return NULL;
12 @@ -2430,7 +2430,7 @@ DEFUN (match_peer_local,
13 "Match peer address\n"
14 "Static or Redistributed routes\n")
15 {
16 - return bgp_route_match_add (vty, vty->index, "peer", NULL);
17 + return bgp_route_match_add (vty, vty->index, "peer", "local");
18 }
19
20 DEFUN (no_match_peer,