[packages] quagga: Bump to v0.99.21

git-svn-id: svn://svn.openwrt.org/openwrt/packages@31987 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
acinonyx 2012-05-29 13:01:43 +00:00
parent e9c8ae34f4
commit bb574a905a
11 changed files with 151 additions and 926 deletions

View File

@ -8,9 +8,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=quagga
PKG_VERSION:=0.99.20
PKG_RELEASE:=4
PKG_MD5SUM:=64cc29394eb8a4e24649d19dac868f64
PKG_VERSION:=0.99.21
PKG_RELEASE:=1
PKG_MD5SUM:=99840adbe57047c90dfba6b6ed9aec7f
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.quagga.net/download/ \

View File

@ -1,425 +1,53 @@
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -8399,8 +8399,14 @@ bgp_str2route_type (int afi, const char
return ZEBRA_ROUTE_STATIC;
else if (strncmp (str, "r", 1) == 0)
return ZEBRA_ROUTE_RIP;
- else if (strncmp (str, "o", 1) == 0)
+ else if (strncmp (str, "os", 2) == 0)
return ZEBRA_ROUTE_OSPF;
+ else if (strncmp (str, "h", 1) == 0)
+ return ZEBRA_ROUTE_HSLS;
+ else if (strncmp (str, "ol", 2) == 0)
+ return ZEBRA_ROUTE_OLSR;
+ else if (strncmp (str, "b", 1) == 0)
+ return ZEBRA_ROUTE_BATMAN;
}
if (afi == AFI_IP6)
{
@@ -8412,21 +8418,30 @@ bgp_str2route_type (int afi, const char
return ZEBRA_ROUTE_STATIC;
else if (strncmp (str, "r", 1) == 0)
return ZEBRA_ROUTE_RIPNG;
- else if (strncmp (str, "o", 1) == 0)
+ else if (strncmp (str, "os", 2) == 0)
return ZEBRA_ROUTE_OSPF6;
+ else if (strncmp (str, "h", 1) == 0)
+ return ZEBRA_ROUTE_HSLS;
+ else if (strncmp (str, "ol", 2) == 0)
+ return ZEBRA_ROUTE_OLSR;
+ else if (strncmp (str, "b", 1) == 0)
+ return ZEBRA_ROUTE_BATMAN;
}
return 0;
}
DEFUN (bgp_redistribute_ipv4,
bgp_redistribute_ipv4_cmd,
- "redistribute (connected|kernel|ospf|rip|static)",
+ "redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman)",
"Redistribute information from another routing protocol\n"
"Connected\n"
"Kernel routes\n"
"Open Shurtest Path First (OSPF)\n"
"Routing Information Protocol (RIP)\n"
- "Static routes\n")
+ "Static routes\n"
+ "Hazy-Sighted Link State Protocol (HSLS)\n"
+ "Optimized Link State Routing (OLSR)\n"
+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n")
{
int type;
@@ -8441,13 +8456,16 @@ DEFUN (bgp_redistribute_ipv4,
DEFUN (bgp_redistribute_ipv4_rmap,
bgp_redistribute_ipv4_rmap_cmd,
- "redistribute (connected|kernel|ospf|rip|static) route-map WORD",
+ "redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) route-map WORD",
"Redistribute information from another routing protocol\n"
"Connected\n"
"Kernel routes\n"
"Open Shurtest Path First (OSPF)\n"
"Routing Information Protocol (RIP)\n"
"Static routes\n"
+ "Hazy-Sighted Link State Protocol (HSLS)\n"
+ "Optimized Link State Routing (OLSR)\n"
+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
"Route map reference\n"
"Pointer to route-map entries\n")
{
@@ -8466,13 +8484,16 @@ DEFUN (bgp_redistribute_ipv4_rmap,
DEFUN (bgp_redistribute_ipv4_metric,
bgp_redistribute_ipv4_metric_cmd,
- "redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295>",
+ "redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) metric <0-4294967295>",
"Redistribute information from another routing protocol\n"
"Connected\n"
"Kernel routes\n"
"Open Shurtest Path First (OSPF)\n"
"Routing Information Protocol (RIP)\n"
"Static routes\n"
+ "Hazy-Sighted Link State Protocol (HSLS)\n"
+ "Optimized Link State Routing (OLSR)\n"
+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
"Metric for redistributed routes\n"
"Default metric\n")
{
@@ -8493,13 +8514,16 @@ DEFUN (bgp_redistribute_ipv4_metric,
DEFUN (bgp_redistribute_ipv4_rmap_metric,
bgp_redistribute_ipv4_rmap_metric_cmd,
- "redistribute (connected|kernel|ospf|rip|static) route-map WORD metric <0-4294967295>",
+ "redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) route-map WORD metric <0-4294967295>",
"Redistribute information from another routing protocol\n"
"Connected\n"
"Kernel routes\n"
"Open Shurtest Path First (OSPF)\n"
"Routing Information Protocol (RIP)\n"
"Static routes\n"
+ "Hazy-Sighted Link State Protocol (HSLS)\n"
+ "Optimized Link State Routing (OLSR)\n"
+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
"Route map reference\n"
"Pointer to route-map entries\n"
"Metric for redistributed routes\n"
@@ -8523,13 +8547,16 @@ DEFUN (bgp_redistribute_ipv4_rmap_metric
DEFUN (bgp_redistribute_ipv4_metric_rmap,
bgp_redistribute_ipv4_metric_rmap_cmd,
- "redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295> route-map WORD",
+ "redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) metric <0-4294967295> route-map WORD",
"Redistribute information from another routing protocol\n"
"Connected\n"
"Kernel routes\n"
"Open Shurtest Path First (OSPF)\n"
"Routing Information Protocol (RIP)\n"
"Static routes\n"
+ "Hazy-Sighted Link State Protocol (HSLS)\n"
+ "Optimized Link State Routing (OLSR)\n"
+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
"Metric for redistributed routes\n"
"Default metric\n"
"Route map reference\n"
@@ -8553,14 +8580,17 @@ DEFUN (bgp_redistribute_ipv4_metric_rmap
DEFUN (no_bgp_redistribute_ipv4,
no_bgp_redistribute_ipv4_cmd,
- "no redistribute (connected|kernel|ospf|rip|static)",
+ "no redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman)",
NO_STR
"Redistribute information from another routing protocol\n"
"Connected\n"
"Kernel routes\n"
"Open Shurtest Path First (OSPF)\n"
"Routing Information Protocol (RIP)\n"
- "Static routes\n")
+ "Static routes\n"
+ "Hazy-Sighted Link State Protocol (HSLS)\n"
+ "Optimized Link State Routing (OLSR)\n"
+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n")
{
int type;
@@ -8576,7 +8606,7 @@ DEFUN (no_bgp_redistribute_ipv4,
DEFUN (no_bgp_redistribute_ipv4_rmap,
no_bgp_redistribute_ipv4_rmap_cmd,
- "no redistribute (connected|kernel|ospf|rip|static) route-map WORD",
+ "no redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) route-map WORD",
NO_STR
"Redistribute information from another routing protocol\n"
"Connected\n"
@@ -8584,6 +8614,9 @@ DEFUN (no_bgp_redistribute_ipv4_rmap,
"Open Shurtest Path First (OSPF)\n"
"Routing Information Protocol (RIP)\n"
"Static routes\n"
+ "Hazy-Sighted Link State Protocol (HSLS)\n"
+ "Optimized Link State Routing (OLSR)\n"
+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
"Route map reference\n"
"Pointer to route-map entries\n")
{
@@ -8602,7 +8635,7 @@ DEFUN (no_bgp_redistribute_ipv4_rmap,
DEFUN (no_bgp_redistribute_ipv4_metric,
no_bgp_redistribute_ipv4_metric_cmd,
- "no redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295>",
+ "no redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) metric <0-4294967295>",
NO_STR
"Redistribute information from another routing protocol\n"
"Connected\n"
@@ -8610,6 +8643,9 @@ DEFUN (no_bgp_redistribute_ipv4_metric,
"Open Shurtest Path First (OSPF)\n"
"Routing Information Protocol (RIP)\n"
"Static routes\n"
+ "Hazy-Sighted Link State Protocol (HSLS)\n"
+ "Optimized Link State Routing (OLSR)\n"
+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
"Metric for redistributed routes\n"
"Default metric\n")
{
@@ -8628,7 +8664,7 @@ DEFUN (no_bgp_redistribute_ipv4_metric,
DEFUN (no_bgp_redistribute_ipv4_rmap_metric,
no_bgp_redistribute_ipv4_rmap_metric_cmd,
- "no redistribute (connected|kernel|ospf|rip|static) route-map WORD metric <0-4294967295>",
+ "no redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) route-map WORD metric <0-4294967295>",
NO_STR
"Redistribute information from another routing protocol\n"
"Connected\n"
@@ -8636,6 +8672,9 @@ DEFUN (no_bgp_redistribute_ipv4_rmap_met
"Open Shurtest Path First (OSPF)\n"
"Routing Information Protocol (RIP)\n"
"Static routes\n"
+ "Hazy-Sighted Link State Protocol (HSLS)\n"
+ "Optimized Link State Routing (OLSR)\n"
+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
"Route map reference\n"
"Pointer to route-map entries\n"
"Metric for redistributed routes\n"
@@ -8657,7 +8696,7 @@ DEFUN (no_bgp_redistribute_ipv4_rmap_met
ALIAS (no_bgp_redistribute_ipv4_rmap_metric,
no_bgp_redistribute_ipv4_metric_rmap_cmd,
- "no redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295> route-map WORD",
+ "no redistribute (connected|kernel|ospf|rip|static|hsls|olsr|batman) metric <0-4294967295> route-map WORD",
NO_STR
"Redistribute information from another routing protocol\n"
"Connected\n"
@@ -8665,6 +8704,9 @@ ALIAS (no_bgp_redistribute_ipv4_rmap_met
"Open Shurtest Path First (OSPF)\n"
"Routing Information Protocol (RIP)\n"
"Static routes\n"
+ "Hazy-Sighted Link State Protocol (HSLS)\n"
+ "Optimized Link State Routing (OLSR)\n"
+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
"Metric for redistributed routes\n"
"Default metric\n"
"Route map reference\n"
@@ -8673,13 +8715,16 @@ ALIAS (no_bgp_redistribute_ipv4_rmap_met
#ifdef HAVE_IPV6
DEFUN (bgp_redistribute_ipv6,
bgp_redistribute_ipv6_cmd,
- "redistribute (connected|kernel|ospf6|ripng|static)",
+ "redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman)",
"Redistribute information from another routing protocol\n"
"Connected\n"
"Kernel routes\n"
"Open Shurtest Path First (OSPFv3)\n"
"Routing Information Protocol (RIPng)\n"
- "Static routes\n")
+ "Static routes\n"
+ "Hazy-Sighted Link State Protocol (HSLS)\n"
+ "Optimized Link State Routing (OLSR)\n"
+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n")
{
int type;
@@ -8695,13 +8740,16 @@ DEFUN (bgp_redistribute_ipv6,
DEFUN (bgp_redistribute_ipv6_rmap,
bgp_redistribute_ipv6_rmap_cmd,
- "redistribute (connected|kernel|ospf6|ripng|static) route-map WORD",
+ "redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) route-map WORD",
"Redistribute information from another routing protocol\n"
"Connected\n"
"Kernel routes\n"
"Open Shurtest Path First (OSPFv3)\n"
"Routing Information Protocol (RIPng)\n"
"Static routes\n"
+ "Hazy-Sighted Link State Protocol (HSLS)\n"
+ "Optimized Link State Routing (OLSR)\n"
+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
"Route map reference\n"
"Pointer to route-map entries\n")
{
@@ -8720,13 +8768,16 @@ DEFUN (bgp_redistribute_ipv6_rmap,
DEFUN (bgp_redistribute_ipv6_metric,
bgp_redistribute_ipv6_metric_cmd,
- "redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295>",
+ "redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) metric <0-4294967295>",
"Redistribute information from another routing protocol\n"
"Connected\n"
"Kernel routes\n"
"Open Shurtest Path First (OSPFv3)\n"
"Routing Information Protocol (RIPng)\n"
"Static routes\n"
+ "Hazy-Sighted Link State Protocol (HSLS)\n"
+ "Optimized Link State Routing (OLSR)\n"
+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
"Metric for redistributed routes\n"
"Default metric\n")
{
@@ -8747,13 +8798,16 @@ DEFUN (bgp_redistribute_ipv6_metric,
DEFUN (bgp_redistribute_ipv6_rmap_metric,
bgp_redistribute_ipv6_rmap_metric_cmd,
- "redistribute (connected|kernel|ospf6|ripng|static) route-map WORD metric <0-4294967295>",
+ "redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) route-map WORD metric <0-4294967295>",
"Redistribute information from another routing protocol\n"
"Connected\n"
"Kernel routes\n"
"Open Shurtest Path First (OSPFv3)\n"
"Routing Information Protocol (RIPng)\n"
"Static routes\n"
+ "Hazy-Sighted Link State Protocol (HSLS)\n"
+ "Optimized Link State Routing (OLSR)\n"
+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
"Route map reference\n"
"Pointer to route-map entries\n"
"Metric for redistributed routes\n"
@@ -8777,13 +8831,16 @@ DEFUN (bgp_redistribute_ipv6_rmap_metric
DEFUN (bgp_redistribute_ipv6_metric_rmap,
bgp_redistribute_ipv6_metric_rmap_cmd,
- "redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295> route-map WORD",
+ "redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) metric <0-4294967295> route-map WORD",
"Redistribute information from another routing protocol\n"
"Connected\n"
"Kernel routes\n"
"Open Shurtest Path First (OSPFv3)\n"
"Routing Information Protocol (RIPng)\n"
"Static routes\n"
+ "Hazy-Sighted Link State Protocol (HSLS)\n"
+ "Optimized Link State Routing (OLSR)\n"
+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
"Metric for redistributed routes\n"
"Default metric\n"
"Route map reference\n"
@@ -8807,14 +8864,17 @@ DEFUN (bgp_redistribute_ipv6_metric_rmap
DEFUN (no_bgp_redistribute_ipv6,
no_bgp_redistribute_ipv6_cmd,
- "no redistribute (connected|kernel|ospf6|ripng|static)",
+ "no redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman)",
NO_STR
"Redistribute information from another routing protocol\n"
"Connected\n"
"Kernel routes\n"
"Open Shurtest Path First (OSPFv3)\n"
"Routing Information Protocol (RIPng)\n"
- "Static routes\n")
+ "Static routes\n"
+ "Hazy-Sighted Link State Protocol (HSLS)\n"
+ "Optimized Link State Routing (OLSR)\n"
+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n")
{
int type;
@@ -8830,7 +8890,7 @@ DEFUN (no_bgp_redistribute_ipv6,
DEFUN (no_bgp_redistribute_ipv6_rmap,
no_bgp_redistribute_ipv6_rmap_cmd,
- "no redistribute (connected|kernel|ospf6|ripng|static) route-map WORD",
+ "no redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) route-map WORD",
NO_STR
"Redistribute information from another routing protocol\n"
"Connected\n"
@@ -8838,6 +8898,9 @@ DEFUN (no_bgp_redistribute_ipv6_rmap,
"Open Shurtest Path First (OSPFv3)\n"
"Routing Information Protocol (RIPng)\n"
"Static routes\n"
+ "Hazy-Sighted Link State Protocol (HSLS)\n"
+ "Optimized Link State Routing (OLSR)\n"
+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
"Route map reference\n"
"Pointer to route-map entries\n")
{
@@ -8856,7 +8919,7 @@ DEFUN (no_bgp_redistribute_ipv6_rmap,
DEFUN (no_bgp_redistribute_ipv6_metric,
no_bgp_redistribute_ipv6_metric_cmd,
- "no redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295>",
+ "no redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) metric <0-4294967295>",
NO_STR
"Redistribute information from another routing protocol\n"
"Connected\n"
@@ -8864,6 +8927,9 @@ DEFUN (no_bgp_redistribute_ipv6_metric,
"Open Shurtest Path First (OSPFv3)\n"
"Routing Information Protocol (RIPng)\n"
"Static routes\n"
+ "Hazy-Sighted Link State Protocol (HSLS)\n"
+ "Optimized Link State Routing (OLSR)\n"
+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
"Metric for redistributed routes\n"
"Default metric\n")
{
@@ -8882,7 +8948,7 @@ DEFUN (no_bgp_redistribute_ipv6_metric,
DEFUN (no_bgp_redistribute_ipv6_rmap_metric,
no_bgp_redistribute_ipv6_rmap_metric_cmd,
- "no redistribute (connected|kernel|ospf6|ripng|static) route-map WORD metric <0-4294967295>",
+ "no redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) route-map WORD metric <0-4294967295>",
NO_STR
"Redistribute information from another routing protocol\n"
"Connected\n"
@@ -8890,6 +8956,9 @@ DEFUN (no_bgp_redistribute_ipv6_rmap_met
"Open Shurtest Path First (OSPFv3)\n"
"Routing Information Protocol (RIPng)\n"
"Static routes\n"
+ "Hazy-Sighted Link State Protocol (HSLS)\n"
+ "Optimized Link State Routing (OLSR)\n"
+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
"Route map reference\n"
"Pointer to route-map entries\n"
"Metric for redistributed routes\n"
@@ -8911,7 +8980,7 @@ DEFUN (no_bgp_redistribute_ipv6_rmap_met
ALIAS (no_bgp_redistribute_ipv6_rmap_metric,
no_bgp_redistribute_ipv6_metric_rmap_cmd,
- "no redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295> route-map WORD",
+ "no redistribute (connected|kernel|ospf6|ripng|static|hsls|olsr|batman) metric <0-4294967295> route-map WORD",
NO_STR
"Redistribute information from another routing protocol\n"
"Connected\n"
@@ -8919,6 +8988,9 @@ ALIAS (no_bgp_redistribute_ipv6_rmap_met
"Open Shurtest Path First (OSPFv3)\n"
"Routing Information Protocol (RIPng)\n"
"Static routes\n"
+ "Hazy-Sighted Link State Protocol (HSLS)\n"
+ "Optimized Link State Routing (OLSR)\n"
+ "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
"Metric for redistributed routes\n"
"Default metric\n"
"Route map reference\n"
--- a/lib/log.c
+++ b/lib/log.c
@@ -837,6 +837,8 @@ static const struct zebra_desc_table rou
DESC_ENTRY (ZEBRA_ROUTE_ISIS, "isis", 'I' ),
DESC_ENTRY (ZEBRA_ROUTE_BGP, "bgp", 'B' ),
DESC_ENTRY (ZEBRA_ROUTE_HSLS, "hsls", 'H' ),
+ DESC_ENTRY (ZEBRA_ROUTE_OLSR, "olsr", 'o' ),
+ DESC_ENTRY (ZEBRA_ROUTE_BATMAN, "batman", 'b' ),
};
#undef DESC_ENTRY
@@ -929,13 +929,19 @@ proto_redistnum(int afi, const char *s)
return ZEBRA_ROUTE_STATIC;
else if (strncmp (s, "r", 1) == 0)
return ZEBRA_ROUTE_RIP;
- else if (strncmp (s, "o", 1) == 0)
+ else if (strncmp (s, "os", 2) == 0)
return ZEBRA_ROUTE_OSPF;
else if (strncmp (s, "i", 1) == 0)
return ZEBRA_ROUTE_ISIS;
else if (strncmp (s, "bg", 2) == 0)
return ZEBRA_ROUTE_BGP;
- else if (strncmp (s, "ba", 2) == 0)
+ else if (strncmp (s, "h", 1) == 0)
+ return ZEBRA_ROUTE_HSLS;
+ else if (strncmp (s, "ol", 2) == 0)
+ return ZEBRA_ROUTE_OLSR;
+ else if (strncmp (s, "bat", 3) == 0)
+ return ZEBRA_ROUTE_BATMAN;
+ else if (strncmp (s, "bab", 3) == 0)
return ZEBRA_ROUTE_BABEL;
}
if (afi == AFI_IP6)
@@ -948,13 +954,19 @@ proto_redistnum(int afi, const char *s)
return ZEBRA_ROUTE_STATIC;
else if (strncmp (s, "r", 1) == 0)
return ZEBRA_ROUTE_RIPNG;
- else if (strncmp (s, "o", 1) == 0)
+ else if (strncmp (s, "os", 2) == 0)
return ZEBRA_ROUTE_OSPF6;
else if (strncmp (s, "i", 1) == 0)
return ZEBRA_ROUTE_ISIS;
else if (strncmp (s, "bg", 2) == 0)
return ZEBRA_ROUTE_BGP;
- else if (strncmp (s, "ba", 2) == 0)
+ else if (strncmp (s, "h", 1) == 0)
+ return ZEBRA_ROUTE_HSLS;
+ else if (strncmp (s, "ol", 2) == 0)
+ return ZEBRA_ROUTE_OLSR;
+ else if (strncmp (s, "bat", 3) == 0)
+ return ZEBRA_ROUTE_BATMAN;
+ else if (strncmp (s, "bab", 3) == 0)
return ZEBRA_ROUTE_BABEL;
}
return -1;
--- a/lib/route_types.txt
+++ b/lib/route_types.txt
@@ -51,13 +51,9 @@ ZEBRA_ROUTE_OSPF, ospf, ospfd
ZEBRA_ROUTE_OSPF6, ospf6, ospf6d, 'O', 0, 1, "OSPF"
ZEBRA_ROUTE_OSPF6, ospf6, ospf6d, 'O', 0, 1, "OSPFv6"
ZEBRA_ROUTE_ISIS, isis, isisd, 'I', 1, 1, "IS-IS"
ZEBRA_ROUTE_BGP, bgp, bgpd, 'B', 1, 1, "BGP"
-# HSLS and OLSR both are AFI independent (so: 1, 1), however
@ -428,216 +56,80 @@
-# to 'switch on' redist support (direct numeric entry remaining
-# possible).
-ZEBRA_ROUTE_HSLS, hsls, hslsd, 'H', 0, 0, "HSLS"
-ZEBRA_ROUTE_OLSR, olsr, oslrd, 'o', 0, 0, "OLSR"
-ZEBRA_ROUTE_OLSR, olsr, olsrd, 'o', 0, 0, "OLSR"
+ZEBRA_ROUTE_HSLS, hsls, hslsd, 'H', 1, 1, "HSLS"
+ZEBRA_ROUTE_OLSR, olsr, olsrd, 'o', 1, 1, "OLSR"
+ZEBRA_ROUTE_BATMAN, batman, batmand,'b', 1, 1, "BATMAN"
ZEBRA_ROUTE_BABEL, babel, babeld, 'A', 1, 1, "Babel"
## help strings
ZEBRA_ROUTE_SYSTEM, "Reserved route type, for internal use only"
@@ -71,4 +67,5 @@ ZEBRA_ROUTE_OSPF6, "Open Shortest Path
@@ -72,5 +68,6 @@ ZEBRA_ROUTE_OSPF6, "Open Shortest Path
ZEBRA_ROUTE_ISIS, "Intermediate System to Intermediate System (IS-IS)"
ZEBRA_ROUTE_BGP, "Border Gateway Protocol (BGP)"
ZEBRA_ROUTE_HSLS, "Hazy-Sighted Link State Protocol (HSLS)"
-ZEBRA_ROUTE_OLSR, "Optimised Link State Routing (OLSR)"
+ZEBRA_ROUTE_OLSR, "Optimized Link State Routing (OLSR)"
+ZEBRA_ROUTE_BATMAN, "Better Approach to Mobile Ad-Hoc Networking (BATMAN)"
--- a/lib/zebra.h
+++ b/lib/zebra.h
@@ -437,7 +437,9 @@ struct in_pktinfo
#define ZEBRA_ROUTE_ISIS 8
#define ZEBRA_ROUTE_BGP 9
#define ZEBRA_ROUTE_HSLS 10
-#define ZEBRA_ROUTE_MAX 11
+#define ZEBRA_ROUTE_OLSR 11
+#define ZEBRA_ROUTE_BATMAN 12
+#define ZEBRA_ROUTE_MAX 13
/* Note: whenever a new route-type or zserv-command is added the
* corresponding {command,route}_types[] table in lib/log.c MUST be
--- a/ospf6d/ospf6_asbr.c
+++ b/ospf6d/ospf6_asbr.c
@@ -616,13 +616,16 @@ ospf6_asbr_redistribute_remove (int type
DEFUN (ospf6_redistribute,
ospf6_redistribute_cmd,
- "redistribute (static|kernel|connected|ripng|bgp)",
+ "redistribute (static|kernel|connected|ripng|bgp|hsls|olsr|batman)",
"Redistribute\n"
"Static route\n"
"Kernel route\n"
"Connected route\n"
"RIPng route\n"
"BGP route\n"
+ "HSLS route\n"
+ "OLSR route\n"
+ "BATMAN route\n"
)
{
int type = 0;
@@ -637,6 +640,12 @@ DEFUN (ospf6_redistribute,
type = ZEBRA_ROUTE_RIPNG;
else if (strncmp (argv[0], "bgp", 3) == 0)
type = ZEBRA_ROUTE_BGP;
+ else if (strncmp (argv[0], "h", 1) == 0)
+ type = ZEBRA_ROUTE_HSLS;
+ else if (strncmp (argv[0], "o", 1) == 0)
+ type = ZEBRA_ROUTE_OLSR;
+ else if (strncmp (argv[0], "ba", 2) == 0)
+ type = ZEBRA_ROUTE_BATMAN;
ospf6_asbr_redistribute_unset (type);
ospf6_asbr_routemap_unset (type);
@@ -646,13 +655,16 @@ DEFUN (ospf6_redistribute,
DEFUN (ospf6_redistribute_routemap,
ospf6_redistribute_routemap_cmd,
- "redistribute (static|kernel|connected|ripng|bgp) route-map WORD",
+ "redistribute (static|kernel|connected|ripng|bgp|hsls|olsr|batman) route-map WORD",
"Redistribute\n"
"Static routes\n"
"Kernel route\n"
"Connected route\n"
"RIPng route\n"
"BGP route\n"
+ "HSLS route\n"
+ "OLSR route\n"
+ "BATMAN route\n"
"Route map reference\n"
"Route map name\n"
)
@@ -669,6 +681,12 @@ DEFUN (ospf6_redistribute_routemap,
type = ZEBRA_ROUTE_RIPNG;
else if (strncmp (argv[0], "bgp", 3) == 0)
type = ZEBRA_ROUTE_BGP;
+ else if (strncmp (argv[0], "h", 1) == 0)
+ type = ZEBRA_ROUTE_HSLS;
+ else if (strncmp (argv[0], "o", 1) == 0)
+ type = ZEBRA_ROUTE_OLSR;
+ else if (strncmp (argv[0], "ba", 2) == 0)
+ type = ZEBRA_ROUTE_BATMAN;
ospf6_asbr_redistribute_unset (type);
ospf6_asbr_routemap_set (type, argv[1]);
@@ -678,7 +696,7 @@ DEFUN (ospf6_redistribute_routemap,
DEFUN (no_ospf6_redistribute,
no_ospf6_redistribute_cmd,
- "no redistribute (static|kernel|connected|ripng|bgp)",
+ "no redistribute (static|kernel|connected|ripng|bgp|hsls|olsr|batman)",
NO_STR
"Redistribute\n"
"Static route\n"
@@ -686,6 +704,9 @@ DEFUN (no_ospf6_redistribute,
"Connected route\n"
"RIPng route\n"
"BGP route\n"
+ "HSLS route\n"
+ "OLSR route\n"
+ "BATMAN route\n"
)
{
int type = 0;
@@ -700,6 +721,12 @@ DEFUN (no_ospf6_redistribute,
type = ZEBRA_ROUTE_RIPNG;
else if (strncmp (argv[0], "bgp", 3) == 0)
type = ZEBRA_ROUTE_BGP;
+ else if (strncmp (argv[0], "h", 1) == 0)
+ type = ZEBRA_ROUTE_HSLS;
+ else if (strncmp (argv[0], "o", 1) == 0)
+ type = ZEBRA_ROUTE_OLSR;
+ else if (strncmp (argv[0], "ba", 2) == 0)
+ type = ZEBRA_ROUTE_BATMAN;
ospf6_asbr_redistribute_unset (type);
ospf6_asbr_routemap_unset (type);
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -107,8 +107,14 @@ str2distribute_source (const char *str,
*source = ZEBRA_ROUTE_STATIC;
else if (strncmp (str, "r", 1) == 0)
*source = ZEBRA_ROUTE_RIP;
- else if (strncmp (str, "b", 1) == 0)
+ else if (strncmp (str, "bg", 2) == 0)
*source = ZEBRA_ROUTE_BGP;
+ else if (strncmp (str, "h", 1) == 0)
+ *source = ZEBRA_ROUTE_HSLS;
+ else if (strncmp (str, "o", 1) == 0)
+ *source = ZEBRA_ROUTE_OLSR;
+ else if (strncmp (str, "ba", 2) == 0)
+ *source = ZEBRA_ROUTE_BATMAN;
else
return 0;
ZEBRA_ROUTE_BABEL, "Babel routing protocol (Babel)"
--- a/ripd/rip_zebra.c
+++ b/ripd/rip_zebra.c
@@ -204,8 +204,11 @@ static struct {
@@ -206,9 +206,12 @@ static struct {
{ZEBRA_ROUTE_KERNEL, 1, "kernel"},
{ZEBRA_ROUTE_CONNECT, 1, "connected"},
{ZEBRA_ROUTE_STATIC, 1, "static"},
- {ZEBRA_ROUTE_OSPF, 1, "ospf"},
- {ZEBRA_ROUTE_BGP, 1, "bgp"},
+ {ZEBRA_ROUTE_OSPF, 2, "ospf"},
+ {ZEBRA_ROUTE_BGP, 2, "bgp"},
{ZEBRA_ROUTE_BGP, 2, "bgp"},
- {ZEBRA_ROUTE_BABEL, 2, "babel"},
+ {ZEBRA_ROUTE_HSLS, 1, "hsls"},
+ {ZEBRA_ROUTE_OLSR, 2, "olsr"},
+ {ZEBRA_ROUTE_BATMAN, 2, "batman"},
+ {ZEBRA_ROUTE_BATMAN, 3, "batman"},
+ {ZEBRA_ROUTE_BABEL, 3, "babel"},
{0, 0, NULL}
};
--- a/ripngd/ripng_zebra.c
+++ b/ripngd/ripng_zebra.c
@@ -214,8 +214,11 @@ static struct {
@@ -216,9 +216,12 @@ static struct {
{ZEBRA_ROUTE_KERNEL, 1, "kernel"},
{ZEBRA_ROUTE_CONNECT, 1, "connected"},
{ZEBRA_ROUTE_STATIC, 1, "static"},
- {ZEBRA_ROUTE_OSPF6, 1, "ospf6"},
- {ZEBRA_ROUTE_BGP, 1, "bgp"},
+ {ZEBRA_ROUTE_OSPF6, 2, "ospf6"},
+ {ZEBRA_ROUTE_BGP, 2, "bgp"},
{ZEBRA_ROUTE_BGP, 2, "bgp"},
- {ZEBRA_ROUTE_BABEL, 2, "babel"},
+ {ZEBRA_ROUTE_HSLS, 1, "hsls"},
+ {ZEBRA_ROUTE_OLSR, 2, "olsr"},
+ {ZEBRA_ROUTE_BATMAN, 2, "batman"},
+ {ZEBRA_ROUTE_BATMAN, 3, "batman"},
+ {ZEBRA_ROUTE_BABEL, 3, "babel"},
{0, 0, NULL}
};
--- a/zebra/redistribute.c
+++ b/zebra/redistribute.c
@@ -255,6 +255,9 @@ zebra_redistribute_add (int command, str
case ZEBRA_ROUTE_OSPF:
case ZEBRA_ROUTE_OSPF6:
case ZEBRA_ROUTE_BGP:
+ case ZEBRA_ROUTE_HSLS:
+ case ZEBRA_ROUTE_OLSR:
+ case ZEBRA_ROUTE_BATMAN:
if (! client->redist[type])
{
client->redist[type] = 1;
@@ -283,6 +286,9 @@ zebra_redistribute_delete (int command,
case ZEBRA_ROUTE_OSPF:
case ZEBRA_ROUTE_OSPF6:
case ZEBRA_ROUTE_BGP:
+ case ZEBRA_ROUTE_HSLS:
+ case ZEBRA_ROUTE_OLSR:
+ case ZEBRA_ROUTE_BATMAN:
client->redist[type] = 0;
break;
default:
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -1623,6 +1623,9 @@ netlink_route_multipath (int cmd, struct
addattr_l (&req.n, sizeof req, RTA_PREFSRC,
&nexthop->src.ipv4, bytelen);
+ if (rib->type == ZEBRA_ROUTE_OLSR)
+ req.r.rtm_scope = RT_SCOPE_LINK;
+
if (IS_ZEBRA_DEBUG_KERNEL)
zlog_debug("netlink_route_multipath() (single hop): "
"nexthop via if %u", nexthop->ifindex);
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -66,7 +66,10 @@ static const struct
{ZEBRA_ROUTE_OSPF, 110},
{ZEBRA_ROUTE_OSPF6, 110},
{ZEBRA_ROUTE_ISIS, 115},
- {ZEBRA_ROUTE_BGP, 20 /* IBGP is 200. */}
+ {ZEBRA_ROUTE_BGP, 20 /* IBGP is 200. */},
+ {ZEBRA_ROUTE_HSLS, 0},
+ {ZEBRA_ROUTE_OLSR, 0},
+ {ZEBRA_ROUTE_BATMAN, 0}
@@ -67,6 +67,9 @@ static const struct
[ZEBRA_ROUTE_OSPF6] = {ZEBRA_ROUTE_OSPF6, 110},
[ZEBRA_ROUTE_ISIS] = {ZEBRA_ROUTE_ISIS, 115},
[ZEBRA_ROUTE_BGP] = {ZEBRA_ROUTE_BGP, 20 /* IBGP is 200. */},
+ [ZEBRA_ROUTE_HSLS] = {ZEBRA_ROUTE_HSLS, 0},
+ [ZEBRA_ROUTE_OLSR] = {ZEBRA_ROUTE_OLSR, 0},
+ [ZEBRA_ROUTE_BATMAN] = {ZEBRA_ROUTE_BATMAN, 0},
[ZEBRA_ROUTE_BABEL] = {ZEBRA_ROUTE_BABEL, 95},
/* no entry/default: 150 */
};
/* Vector for routing table. */
@@ -374,6 +377,18 @@ nexthop_active_ipv4 (struct rib *rib, st
@@ -381,6 +384,18 @@ nexthop_active_ipv4 (struct rib *rib, st
return 1;
}
@ -656,7 +148,7 @@
else if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_INTERNAL))
{
for (newhop = match->nexthop; newhop; newhop = newhop->next)
@@ -476,6 +491,18 @@ nexthop_active_ipv6 (struct rib *rib, st
@@ -483,6 +498,18 @@ nexthop_active_ipv6 (struct rib *rib, st
return 1;
}
@ -675,15 +167,15 @@
else if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_INTERNAL))
{
for (newhop = match->nexthop; newhop; newhop = newhop->next)
@@ -1229,6 +1256,8 @@ static const u_char meta_queue_map[ZEBRA
@@ -1236,6 +1263,8 @@ static const u_char meta_queue_map[ZEBRA
[ZEBRA_ROUTE_ISIS] = 2,
[ZEBRA_ROUTE_BGP] = 3,
[ZEBRA_ROUTE_HSLS] = 4,
+ [ZEBRA_ROUTE_OLSR] = 4,
+ [ZEBRA_ROUTE_BATMAN] = 4,
[ZEBRA_ROUTE_BABEL] = 2,
};
/* Look into the RN and queue it into one or more priority queues,
--- a/zebra/zebra_snmp.c
+++ b/zebra/zebra_snmp.c
@@ -251,6 +251,12 @@ proto_trans(int type)
@ -701,9 +193,9 @@
}
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -557,7 +557,10 @@ vty_show_ip_route_detail (struct vty *vt
if (rib->type == ZEBRA_ROUTE_RIP
@@ -558,7 +558,10 @@ vty_show_ip_route_detail (struct vty *vt
|| rib->type == ZEBRA_ROUTE_OSPF
|| rib->type == ZEBRA_ROUTE_BABEL
|| rib->type == ZEBRA_ROUTE_ISIS
- || rib->type == ZEBRA_ROUTE_BGP)
+ || rib->type == ZEBRA_ROUTE_BGP
@ -713,9 +205,9 @@
{
time_t uptime;
struct tm *tm;
@@ -775,7 +778,10 @@ vty_show_ip_route (struct vty *vty, stru
if (rib->type == ZEBRA_ROUTE_RIP
@@ -777,7 +780,10 @@ vty_show_ip_route (struct vty *vty, stru
|| rib->type == ZEBRA_ROUTE_OSPF
|| rib->type == ZEBRA_ROUTE_BABEL
|| rib->type == ZEBRA_ROUTE_ISIS
- || rib->type == ZEBRA_ROUTE_BGP)
+ || rib->type == ZEBRA_ROUTE_BGP
@ -725,94 +217,9 @@
{
time_t uptime;
struct tm *tm;
@@ -803,8 +809,8 @@ vty_show_ip_route (struct vty *vty, stru
}
#define SHOW_ROUTE_V4_HEADER "Codes: K - kernel route, C - connected, " \
- "S - static, R - RIP, O - OSPF,%s I - ISIS, B - BGP, " \
- "> - selected route, * - FIB route%s%s"
+ "S - static, R - RIP, O - OSPF,%s I - ISIS, B - BGP, H - HSLS, " \
+ "o - OLSR, b - BATMAN,%s > - selected route, * - FIB route%s%s"
DEFUN (show_ip_route,
show_ip_route_cmd,
@@ -829,7 +835,7 @@ DEFUN (show_ip_route,
if (first)
{
vty_out (vty, SHOW_ROUTE_V4_HEADER, VTY_NEWLINE, VTY_NEWLINE,
- VTY_NEWLINE);
+ VTY_NEWLINE, VTY_NEWLINE);
first = 0;
}
vty_show_ip_route (vty, rn, rib);
@@ -872,7 +878,7 @@ DEFUN (show_ip_route_prefix_longer,
if (first)
{
vty_out (vty, SHOW_ROUTE_V4_HEADER, VTY_NEWLINE,
- VTY_NEWLINE, VTY_NEWLINE);
+ VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE);
first = 0;
}
vty_show_ip_route (vty, rn, rib);
@@ -911,7 +917,7 @@ DEFUN (show_ip_route_supernets,
if (first)
{
vty_out (vty, SHOW_ROUTE_V4_HEADER, VTY_NEWLINE,
- VTY_NEWLINE, VTY_NEWLINE);
+ VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE);
first = 0;
}
vty_show_ip_route (vty, rn, rib);
@@ -922,7 +928,7 @@ DEFUN (show_ip_route_supernets,
DEFUN (show_ip_route_protocol,
show_ip_route_protocol_cmd,
- "show ip route (bgp|connected|isis|kernel|ospf|rip|static)",
+ "show ip route (bgp|connected|isis|kernel|ospf|rip|static|hsls|olsr|batman)",
SHOW_STR
IP_STR
"IP routing table\n"
@@ -940,13 +946,13 @@ DEFUN (show_ip_route_protocol,
struct rib *rib;
int first = 1;
- if (strncmp (argv[0], "b", 1) == 0)
+ if (strncmp (argv[0], "bg", 2) == 0)
type = ZEBRA_ROUTE_BGP;
else if (strncmp (argv[0], "c", 1) == 0)
type = ZEBRA_ROUTE_CONNECT;
else if (strncmp (argv[0], "k", 1) ==0)
type = ZEBRA_ROUTE_KERNEL;
- else if (strncmp (argv[0], "o", 1) == 0)
+ else if (strncmp (argv[0], "os", 2) == 0)
type = ZEBRA_ROUTE_OSPF;
else if (strncmp (argv[0], "i", 1) == 0)
type = ZEBRA_ROUTE_ISIS;
@@ -954,6 +960,12 @@ DEFUN (show_ip_route_protocol,
type = ZEBRA_ROUTE_RIP;
else if (strncmp (argv[0], "s", 1) == 0)
type = ZEBRA_ROUTE_STATIC;
+ else if (strncmp (argv[0], "h", 1) == 0)
+ type = ZEBRA_ROUTE_HSLS;
+ else if (strncmp (argv[0], "ol", 2) == 0)
+ type = ZEBRA_ROUTE_OLSR;
+ else if (strncmp (argv[0], "ba", 2) == 0)
+ type = ZEBRA_ROUTE_BATMAN;
else
{
vty_out (vty, "Unknown route type%s", VTY_NEWLINE);
@@ -971,7 +983,7 @@ DEFUN (show_ip_route_protocol,
{
if (first)
{
- vty_out (vty, SHOW_ROUTE_V4_HEADER,
+ vty_out (vty, SHOW_ROUTE_V4_HEADER, VTY_NEWLINE,
VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE);
first = 0;
}
@@ -1560,7 +1572,10 @@ vty_show_ipv6_route_detail (struct vty *
if (rib->type == ZEBRA_ROUTE_RIPNG
@@ -1536,7 +1542,10 @@ vty_show_ipv6_route_detail (struct vty *
|| rib->type == ZEBRA_ROUTE_OSPF6
|| rib->type == ZEBRA_ROUTE_BABEL
|| rib->type == ZEBRA_ROUTE_ISIS
- || rib->type == ZEBRA_ROUTE_BGP)
+ || rib->type == ZEBRA_ROUTE_BGP
@ -822,9 +229,9 @@
{
time_t uptime;
struct tm *tm;
@@ -1739,7 +1754,10 @@ vty_show_ipv6_route (struct vty *vty, st
if (rib->type == ZEBRA_ROUTE_RIPNG
@@ -1716,7 +1725,10 @@ vty_show_ipv6_route (struct vty *vty, st
|| rib->type == ZEBRA_ROUTE_OSPF6
|| rib->type == ZEBRA_ROUTE_BABEL
|| rib->type == ZEBRA_ROUTE_ISIS
- || rib->type == ZEBRA_ROUTE_BGP)
+ || rib->type == ZEBRA_ROUTE_BGP
@ -834,62 +241,3 @@
{
time_t uptime;
struct tm *tm;
@@ -1766,7 +1784,7 @@ vty_show_ipv6_route (struct vty *vty, st
}
}
-#define SHOW_ROUTE_V6_HEADER "Codes: K - kernel route, C - connected, S - static, R - RIPng, O - OSPFv3,%s I - ISIS, B - BGP, * - FIB route.%s%s"
+#define SHOW_ROUTE_V6_HEADER "Codes: K - kernel route, C - connected, S - static, R - RIPng, O - OSPFv3,%s I - ISIS, B - BGP, H - HSLS, o - OLSR, b - BATMAN, * - FIB route.%s%s"
DEFUN (show_ipv6_route,
show_ipv6_route_cmd,
@@ -1842,7 +1860,7 @@ DEFUN (show_ipv6_route_prefix_longer,
DEFUN (show_ipv6_route_protocol,
show_ipv6_route_protocol_cmd,
- "show ipv6 route (bgp|connected|isis|kernel|ospf6|ripng|static)",
+ "show ipv6 route (bgp|connected|isis|kernel|ospf6|ripng|static|hsls|olsr|batman)",
SHOW_STR
IP_STR
"IP routing table\n"
@@ -1860,13 +1878,13 @@ DEFUN (show_ipv6_route_protocol,
struct rib *rib;
int first = 1;
- if (strncmp (argv[0], "b", 1) == 0)
+ if (strncmp (argv[0], "bg", 2) == 0)
type = ZEBRA_ROUTE_BGP;
else if (strncmp (argv[0], "c", 1) == 0)
type = ZEBRA_ROUTE_CONNECT;
else if (strncmp (argv[0], "k", 1) ==0)
type = ZEBRA_ROUTE_KERNEL;
- else if (strncmp (argv[0], "o", 1) == 0)
+ else if (strncmp (argv[0], "os", 2) == 0)
type = ZEBRA_ROUTE_OSPF6;
else if (strncmp (argv[0], "i", 1) == 0)
type = ZEBRA_ROUTE_ISIS;
@@ -1874,6 +1892,12 @@ DEFUN (show_ipv6_route_protocol,
type = ZEBRA_ROUTE_RIPNG;
else if (strncmp (argv[0], "s", 1) == 0)
type = ZEBRA_ROUTE_STATIC;
+ else if (strncmp (argv[0], "h", 1) == 0)
+ type = ZEBRA_ROUTE_HSLS;
+ else if (strncmp (argv[0], "ol", 2) == 0)
+ type = ZEBRA_ROUTE_OLSR;
+ else if (strncmp (argv[0], "ba", 2) == 0)
+ type = ZEBRA_ROUTE_BATMAN;
else
{
vty_out (vty, "Unknown route type%s", VTY_NEWLINE);
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -1494,6 +1494,9 @@ netlink_route_multipath (int cmd, struct
addattr_l (&req.n, sizeof req, RTA_PREFSRC,
&nexthop->src.ipv4, bytelen);
+ if (rib->type == ZEBRA_ROUTE_OLSR)
+ req.r.rtm_scope = RT_SCOPE_LINK;
+
if (IS_ZEBRA_DEBUG_KERNEL)
zlog_debug("netlink_route_multipath() (single hop): "
"nexthop via if %u", nexthop->ifindex);

View File

@ -1,11 +1,11 @@
--- a/vtysh/extract.pl.in
+++ b/vtysh/extract.pl.in
@@ -62,7 +62,7 @@ $ignore{'"show history"'} = "ignore";
@@ -63,7 +63,7 @@ $ignore{'"show history"'} = "ignore";
foreach (@ARGV) {
$file = $_;
- open (FH, "cpp -DHAVE_CONFIG_H -DVTYSH_EXTRACT_PL -DHAVE_IPV6 -I@top_builddir@ -I@srcdir@/ -I@srcdir@/.. -I@top_srcdir@/lib -I@top_srcdir@/isisd/topology @SNMP_INCLUDES@ $file |");
+ open (FH, "@CPP@ @CPPFLAGS@ -DHAVE_CONFIG_H -DVTYSH_EXTRACT_PL -DHAVE_IPV6 -I@top_builddir@ -I@srcdir@/ -I@srcdir@/.. -I@top_srcdir@/lib -I@top_srcdir@/isisd/topology @SNMP_INCLUDES@ $file |");
- open (FH, "cpp -DHAVE_CONFIG_H -DVTYSH_EXTRACT_PL -DHAVE_IPV6 -I@top_builddir@ -I@srcdir@/ -I@srcdir@/.. -I@top_srcdir@/lib -I@top_srcdir@/isisd/topology @SNMP_INCLUDES@ @CPPFLAGS@ $file |");
+ open (FH, "@CPP@ -DHAVE_CONFIG_H -DVTYSH_EXTRACT_PL -DHAVE_IPV6 -I@top_builddir@ -I@srcdir@/ -I@srcdir@/.. -I@top_srcdir@/lib -I@top_srcdir@/isisd/topology @SNMP_INCLUDES@ @CPPFLAGS@ $file |");
local $/; undef $/;
$line = <FH>;
close (FH);

View File

@ -12,7 +12,7 @@
sockunion2str (&su, buf, SU_ADDRSTRLEN);
--- a/bgpd/bgpd.h
+++ b/bgpd/bgpd.h
@@ -712,6 +712,7 @@ struct bgp_nlri
@@ -718,6 +718,7 @@ struct bgp_nlri
/* BGP timers default value. */
#define BGP_INIT_START_TIMER 5
#define BGP_ERROR_START_TIMER 30

View File

@ -1,6 +1,6 @@
--- a/lib/command.c
+++ b/lib/command.c
@@ -2599,6 +2599,13 @@ DEFUN (config_write_file,
@@ -2601,6 +2601,13 @@ DEFUN (config_write_file,
VTY_NEWLINE);
goto finished;
}
@ -14,7 +14,7 @@
if (link (config_file, config_file_sav) != 0)
{
vty_out (vty, "Can't backup old configuration file %s.%s", config_file_sav,
@@ -2612,7 +2619,23 @@ DEFUN (config_write_file,
@@ -2614,7 +2621,23 @@ DEFUN (config_write_file,
VTY_NEWLINE);
goto finished;
}

View File

@ -29,16 +29,16 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
bgp_debug.c bgp_route.c bgp_zebra.c bgp_open.c bgp_routemap.c \
bgp_packet.c bgp_network.c bgp_filter.c bgp_regex.c bgp_clist.c \
bgp_dump.c bgp_snmp.c bgp_ecommunity.c bgp_mplsvpn.c bgp_nexthop.c \
- bgp_damp.c bgp_table.c bgp_advertise.c bgp_vty.c
+ bgp_damp.c bgp_table.c bgp_advertise.c bgp_vty.c bgp_pgbgp.c
- bgp_damp.c bgp_table.c bgp_advertise.c bgp_vty.c bgp_mpath.c
+ bgp_damp.c bgp_table.c bgp_advertise.c bgp_vty.c bgp_mpath.c bgp_pgbgp.c
noinst_HEADERS = \
bgp_aspath.h bgp_attr.h bgp_community.h bgp_debug.h bgp_fsm.h \
bgp_network.h bgp_open.h bgp_packet.h bgp_regex.h bgp_route.h \
bgpd.h bgp_filter.h bgp_clist.h bgp_dump.h bgp_zebra.h \
bgp_ecommunity.h bgp_mplsvpn.h bgp_nexthop.h bgp_damp.h bgp_table.h \
- bgp_advertise.h bgp_snmp.h bgp_vty.h
+ bgp_advertise.h bgp_snmp.h bgp_vty.h bgp_pgbgp.h
- bgp_advertise.h bgp_snmp.h bgp_vty.h bgp_mpath.h
+ bgp_advertise.h bgp_snmp.h bgp_vty.h bgp_mpath.h bgp_pgbgp.h
bgpd_SOURCES = bgp_main.c
bgpd_LDADD = libbgp.a ../lib/libzebra.la @LIBCAP@ @LIBM@
@ -2745,9 +2745,9 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
#include "bgpd/bgp_advertise.h"
#include "bgpd/bgp_zebra.h"
#include "bgpd/bgp_vty.h"
@@ -332,12 +333,19 @@ bgp_info_cmp (struct bgp *bgp, struct bg
int confed_as_route = 0;
int ret;
@@ -339,12 +340,19 @@ bgp_info_cmp (struct bgp *bgp, struct bg
*paths_eq = 0;
+
/* 0. Null check. */
@ -2765,8 +2765,8 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
/* 1. Weight check. */
if (new->attr->extra)
new_weight = new->attr->extra->weight;
@@ -1508,6 +1516,10 @@ bgp_process_main (struct work_queue *wq,
bgp_info_unset_flag (rn, new_select, BGP_INFO_ATTR_CHANGED);
@@ -1583,6 +1591,10 @@ bgp_process_main (struct work_queue *wq,
UNSET_FLAG (new_select->flags, BGP_INFO_MULTIPATH_CHG);
}
+ /* PGBGP needs to know about selected routes */
@ -2776,7 +2776,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
/* Check each BGP peer. */
for (ALL_LIST_ELEMENTS (bgp->peer, node, nnode, peer))
@@ -1831,6 +1843,11 @@ bgp_update_rsclient (struct peer *rsclie
@@ -1906,6 +1918,11 @@ bgp_update_rsclient (struct peer *rsclie
/* If the update is implicit withdraw. */
if (ri)
{
@ -2788,7 +2788,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
ri->uptime = bgp_clock ();
/* Same attribute comes in. */
@@ -2262,6 +2279,11 @@ bgp_update_main (struct peer *peer, stru
@@ -2337,6 +2354,11 @@ bgp_update_main (struct peer *peer, stru
/* Increment prefix */
bgp_aggregate_increment (bgp, p, new, afi, safi);
@ -2800,7 +2800,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
/* Register new BGP information. */
bgp_info_add (rn, new);
@@ -5474,6 +5496,20 @@ enum bgp_display_type
@@ -5559,6 +5581,20 @@ enum bgp_display_type
static void
route_vty_short_status_out (struct vty *vty, struct bgp_info *binfo)
{
@ -2821,7 +2821,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
/* Route status display. */
if (CHECK_FLAG (binfo->flags, BGP_INFO_REMOVED))
vty_out (vty, "R");
@@ -5974,6 +6010,7 @@ route_vty_out_detail (struct vty *vty, s
@@ -6064,6 +6100,7 @@ route_vty_out_detail (struct vty *vty, s
}
#define BGP_SHOW_SCODE_HEADER "Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,%s r RIB-failure, S Stale, R Removed%s"
@ -2829,7 +2829,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
#define BGP_SHOW_OCODE_HEADER "Origin codes: i - IGP, e - EGP, ? - incomplete%s%s"
#define BGP_SHOW_HEADER " Network Next Hop Metric LocPrf Weight Path%s"
#define BGP_SHOW_DAMP_HEADER " Network From Reuse Path%s"
@@ -6005,7 +6042,8 @@ enum bgp_show_type
@@ -6095,7 +6132,8 @@ enum bgp_show_type
bgp_show_type_flap_route_map,
bgp_show_type_flap_neighbor,
bgp_show_type_dampend_paths,
@ -2839,7 +2839,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
};
static int
@@ -6172,11 +6210,17 @@ bgp_show_table (struct vty *vty, struct
@@ -6262,11 +6300,17 @@ bgp_show_table (struct vty *vty, struct
|| CHECK_FLAG (ri->flags, BGP_INFO_HISTORY))
continue;
}
@ -2857,7 +2857,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
vty_out (vty, BGP_SHOW_OCODE_HEADER, VTY_NEWLINE, VTY_NEWLINE);
if (type == bgp_show_type_dampend_paths
|| type == bgp_show_type_damp_neighbor)
@@ -6254,6 +6298,7 @@ bgp_show (struct vty *vty, struct bgp *b
@@ -6344,6 +6388,7 @@ bgp_show (struct vty *vty, struct bgp *b
return bgp_show_table (vty, table, &bgp->router_id, type, output_arg);
}
@ -2865,7 +2865,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
/* Header of detailed BGP route information */
static void
route_vty_out_detail_header (struct vty *vty, struct bgp *bgp,
@@ -11823,6 +11868,64 @@ DEFUN (bgp_damp_set,
@@ -11904,6 +11949,64 @@ DEFUN (bgp_damp_set,
half, reuse, suppress, max);
}
@ -2930,7 +2930,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
ALIAS (bgp_damp_set,
bgp_damp_set2_cmd,
"bgp dampening <1-45>",
@@ -11872,6 +11975,19 @@ DEFUN (show_ip_bgp_dampened_paths,
@@ -11953,6 +12056,19 @@ DEFUN (show_ip_bgp_dampened_paths,
NULL);
}
@ -2950,7 +2950,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
DEFUN (show_ip_bgp_flap_statistics,
show_ip_bgp_flap_statistics_cmd,
"show ip bgp flap-statistics",
@@ -12398,6 +12514,7 @@ bgp_route_init (void)
@@ -12479,6 +12595,7 @@ bgp_route_init (void)
install_element (VIEW_NODE, &show_ip_bgp_neighbor_received_prefix_filter_cmd);
install_element (VIEW_NODE, &show_ip_bgp_ipv4_neighbor_received_prefix_filter_cmd);
install_element (VIEW_NODE, &show_ip_bgp_dampened_paths_cmd);
@ -2958,7 +2958,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
install_element (VIEW_NODE, &show_ip_bgp_flap_statistics_cmd);
install_element (VIEW_NODE, &show_ip_bgp_flap_address_cmd);
install_element (VIEW_NODE, &show_ip_bgp_flap_prefix_cmd);
@@ -12531,6 +12648,7 @@ bgp_route_init (void)
@@ -12612,6 +12729,7 @@ bgp_route_init (void)
install_element (ENABLE_NODE, &show_ip_bgp_neighbor_received_prefix_filter_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_ipv4_neighbor_received_prefix_filter_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_dampened_paths_cmd);
@ -2966,7 +2966,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
install_element (ENABLE_NODE, &show_ip_bgp_flap_statistics_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_flap_address_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_flap_prefix_cmd);
@@ -12918,6 +13036,10 @@ bgp_route_init (void)
@@ -13002,6 +13120,10 @@ bgp_route_init (void)
install_element (BGP_IPV4_NODE, &bgp_damp_unset_cmd);
install_element (BGP_IPV4_NODE, &bgp_damp_unset2_cmd);
@ -2984,18 +2984,27 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
/* BGP routing information base
Copyright (C) 1996, 97, 98, 2000 Kunihiro Ishiguro
@@ -76,6 +77,10 @@ struct bgp_info
#define BGP_INFO_STALE (1 << 8)
#define BGP_INFO_REMOVED (1 << 9)
@@ -68,7 +69,7 @@ struct bgp_info
int lock;
/* BGP information status. */
- u_int16_t flags;
+ u_int32_t flags;
#define BGP_INFO_IGP_CHANGED (1 << 0)
#define BGP_INFO_DAMPED (1 << 1)
#define BGP_INFO_HISTORY (1 << 2)
@@ -82,6 +83,10 @@ struct bgp_info
#define BGP_INFO_COUNTED (1 << 10)
+#define BGP_INFO_SUSPICIOUS_O (1 << 11)
+#define BGP_INFO_SUSPICIOUS_P (1 << 12)
+#define BGP_INFO_IGNORED_P (1 << 13)
+#define BGP_INFO_SUSPICIOUS_E (1 << 14)
#define BGP_INFO_MULTIPATH (1 << 11)
#define BGP_INFO_MULTIPATH_CHG (1 << 12)
+#define BGP_INFO_SUSPICIOUS_O (1 << 13)
+#define BGP_INFO_SUSPICIOUS_P (1 << 14)
+#define BGP_INFO_IGNORED_P (1 << 15)
+#define BGP_INFO_SUSPICIOUS_E (1 << 16)
/* BGP route type. This can be static, RIP, OSPF, BGP etc. */
u_char type;
@@ -120,7 +125,7 @@ struct bgp_static
@@ -126,7 +131,7 @@ struct bgp_static
/* Flags which indicate a route is unuseable in some form */
#define BGP_INFO_UNUSEABLE \
@ -3077,7 +3086,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=c2ee55705c
--- a/lib/memtypes.c
+++ b/lib/memtypes.c
@@ -147,6 +147,15 @@ struct memory_list memory_list_bgp[] =
@@ -148,6 +148,15 @@ struct memory_list memory_list_bgp[] =
{ MTYPE_PEER_UPDATE_SOURCE, "BGP peer update interface" },
{ MTYPE_BGP_DAMP_INFO, "Dampening info" },
{ MTYPE_BGP_DAMP_ARRAY, "BGP Dampening array" },

View File

@ -204,7 +204,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=06ac72f9f6
return 0;
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -5496,20 +5496,6 @@ enum bgp_display_type
@@ -5581,20 +5581,6 @@ enum bgp_display_type
static void
route_vty_short_status_out (struct vty *vty, struct bgp_info *binfo)
{
@ -225,7 +225,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=06ac72f9f6
/* Route status display. */
if (CHECK_FLAG (binfo->flags, BGP_INFO_REMOVED))
vty_out (vty, "R");
@@ -5525,6 +5511,17 @@ route_vty_short_status_out (struct vty *
@@ -5610,6 +5596,17 @@ route_vty_short_status_out (struct vty *
/* Selected */
if (CHECK_FLAG (binfo->flags, BGP_INFO_HISTORY))
vty_out (vty, "h");
@ -243,7 +243,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=06ac72f9f6
else if (CHECK_FLAG (binfo->flags, BGP_INFO_DAMPED))
vty_out (vty, "d");
else if (CHECK_FLAG (binfo->flags, BGP_INFO_SELECTED))
@@ -5998,7 +5995,22 @@ route_vty_out_detail (struct vty *vty, s
@@ -6088,7 +6085,22 @@ route_vty_out_detail (struct vty *vty, s
if (binfo->extra && binfo->extra->damp_info)
bgp_damp_info_vty (vty, binfo);
@ -267,7 +267,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=06ac72f9f6
#ifdef HAVE_CLOCK_MONOTONIC
tbuf = time(NULL) - (bgp_clock() - binfo->uptime);
vty_out (vty, " Last update: %s", ctime(&tbuf));
@@ -6009,8 +6021,9 @@ route_vty_out_detail (struct vty *vty, s
@@ -6099,8 +6111,9 @@ route_vty_out_detail (struct vty *vty, s
vty_out (vty, "%s", VTY_NEWLINE);
}
@ -279,7 +279,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=06ac72f9f6
#define BGP_SHOW_OCODE_HEADER "Origin codes: i - IGP, e - EGP, ? - incomplete%s%s"
#define BGP_SHOW_HEADER " Network Next Hop Metric LocPrf Weight Path%s"
#define BGP_SHOW_DAMP_HEADER " Network From Reuse Path%s"
@@ -6219,8 +6232,7 @@ bgp_show_table (struct vty *vty, struct
@@ -6309,8 +6322,7 @@ bgp_show_table (struct vty *vty, struct
if (header)
{
vty_out (vty, "BGP table version is 0, local router ID is %s%s", inet_ntoa (*router_id), VTY_NEWLINE);
@ -289,7 +289,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=06ac72f9f6
vty_out (vty, BGP_SHOW_OCODE_HEADER, VTY_NEWLINE, VTY_NEWLINE);
if (type == bgp_show_type_dampend_paths
|| type == bgp_show_type_damp_neighbor)
@@ -9761,7 +9773,7 @@ show_adj_route (struct vty *vty, struct
@@ -9842,7 +9854,7 @@ show_adj_route (struct vty *vty, struct
PEER_STATUS_DEFAULT_ORIGINATE))
{
vty_out (vty, "BGP table version is 0, local router ID is %s%s", inet_ntoa (bgp->router_id), VTY_NEWLINE);
@ -298,7 +298,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=06ac72f9f6
vty_out (vty, BGP_SHOW_OCODE_HEADER, VTY_NEWLINE, VTY_NEWLINE);
vty_out (vty, "Originating default network 0.0.0.0%s%s",
@@ -9778,7 +9790,7 @@ show_adj_route (struct vty *vty, struct
@@ -9859,7 +9871,7 @@ show_adj_route (struct vty *vty, struct
if (header1)
{
vty_out (vty, "BGP table version is 0, local router ID is %s%s", inet_ntoa (bgp->router_id), VTY_NEWLINE);
@ -307,7 +307,7 @@ X-Git-Url: http://git.ozo.com/?p=quagga-pgbg.git;a=commitdiff_plain;h=06ac72f9f6
vty_out (vty, BGP_SHOW_OCODE_HEADER, VTY_NEWLINE, VTY_NEWLINE);
header1 = 0;
}
@@ -9802,7 +9814,7 @@ show_adj_route (struct vty *vty, struct
@@ -9883,7 +9895,7 @@ show_adj_route (struct vty *vty, struct
if (header1)
{
vty_out (vty, "BGP table version is 0, local router ID is %s%s", inet_ntoa (bgp->router_id), VTY_NEWLINE);

View File

@ -1,6 +1,6 @@
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -268,7 +268,7 @@ vtysh_pager_init (void)
@@ -269,7 +269,7 @@ vtysh_pager_init (void)
if (pager_defined)
vtysh_pager_name = strdup (pager_defined);
else
@ -9,7 +9,7 @@
}
/* Command execution over the vty interface. */
@@ -1866,7 +1866,7 @@ DEFUN (vtysh_terminal_length,
@@ -1885,7 +1885,7 @@ DEFUN (vtysh_terminal_length,
{
int lines;
char *endptr = NULL;
@ -18,7 +18,7 @@
lines = strtol (argv[0], &endptr, 10);
if (lines < 0 || lines > 512 || *endptr != '\0')
@@ -1883,7 +1883,7 @@ DEFUN (vtysh_terminal_length,
@@ -1902,7 +1902,7 @@ DEFUN (vtysh_terminal_length,
if (lines != 0)
{

View File

@ -1,61 +0,0 @@
From b24b19f719fdd9c3d61a0c93552cd64d832d964c Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Tue, 6 Dec 2011 14:09:18 +0400
Subject: [PATCH] lib: fix memory leak on connect() failure
Change sockunion_log() to not use strdup(). This fixes a small memory
leak that occurs on every failed connect(), and is simpler/cleaner.
---
lib/sockunion.c | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
--- a/lib/sockunion.c
+++ b/lib/sockunion.c
@@ -297,27 +297,24 @@ sockunion_sizeof (union sockunion *su)
}
/* return sockunion structure : this function should be revised. */
-static char *
-sockunion_log (union sockunion *su)
+static const char *
+sockunion_log (union sockunion *su, char *buf, size_t len)
{
- static char buf[SU_ADDRSTRLEN];
-
switch (su->sa.sa_family)
{
case AF_INET:
- snprintf (buf, SU_ADDRSTRLEN, "%s", inet_ntoa (su->sin.sin_addr));
- break;
+ return inet_ntop(AF_INET, &su->sin.sin_addr, buf, len);
+
#ifdef HAVE_IPV6
case AF_INET6:
- snprintf (buf, SU_ADDRSTRLEN, "%s",
- inet_ntop (AF_INET6, &(su->sin6.sin6_addr), buf, SU_ADDRSTRLEN));
+ return inet_ntop(AF_INET6, &(su->sin6.sin6_addr), buf, len);
break;
#endif /* HAVE_IPV6 */
+
default:
- snprintf (buf, SU_ADDRSTRLEN, "af_unknown %d ", su->sa.sa_family);
- break;
+ snprintf (buf, len, "af_unknown %d ", su->sa.sa_family);
+ return buf;
}
- return (XSTRDUP (MTYPE_TMP, buf));
}
/* sockunion_connect returns
@@ -379,8 +376,10 @@ sockunion_connect (int fd, union sockuni
{
if (errno != EINPROGRESS)
{
+ char str[SU_ADDRSTRLEN];
zlog_info ("can't connect to %s fd %d : %s",
- sockunion_log (&su), fd, safe_strerror (errno));
+ sockunion_log (&su, str, sizeof str),
+ fd, safe_strerror (errno));
return connect_error;
}
}

View File

@ -1,51 +0,0 @@
From 6a2e0f36b103386e57dbe3a6ee4716e809111198 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Tue, 6 Dec 2011 14:04:12 +0400
Subject: [PATCH] lib: call filter delete hook before freeing access list
The delete_hook was being run after calling access list delete function.
This would cause ospf to dereference a NULL, in ospf_filter_update
because 'access->name' was already freed.
See also:
https://bugzilla.vyatta.com/show_bug.cgi?id=7654
---
lib/filter.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
--- a/lib/filter.c
+++ b/lib/filter.c
@@ -1337,13 +1337,13 @@ DEFUN (no_access_list_all,
master = access->master;
- /* Delete all filter from access-list. */
- access_list_delete (access);
-
/* Run hook function. */
if (master->delete_hook)
(*master->delete_hook) (access);
+ /* Delete all filter from access-list. */
+ access_list_delete (access);
+
return CMD_SUCCESS;
}
@@ -1508,13 +1508,13 @@ DEFUN (no_ipv6_access_list_all,
master = access->master;
- /* Delete all filter from access-list. */
- access_list_delete (access);
-
/* Run hook function. */
if (master->delete_hook)
(*master->delete_hook) (access);
+ /* Delete all filter from access-list. */
+ access_list_delete (access);
+
return CMD_SUCCESS;
}

View File

@ -1,20 +0,0 @@
From ce0af6ff5a4f200035ed4134da72a67f49a21dd6 Mon Sep 17 00:00:00 2001
From: "Oleg A. Arkhangelsky" <sysoleg@yandex.ru>
Date: Sat, 3 Dec 2011 15:18:19 +0400
Subject: [PATCH] bgpd: fix memory leak for extra attributes
this fixes commit b881c7074bb698aeb1b099175b325734fc6e44d2
---
bgpd/bgp_attr.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
--- a/bgpd/bgp_attr.c
+++ b/bgpd/bgp_attr.c
@@ -675,6 +675,7 @@ bgp_attr_unintern (struct attr **attr)
}
bgp_attr_unintern_sub (&tmp);
+ bgp_attr_extra_free (&tmp);
}
void