From: Vasilis Tsiligiannis Date: Wed, 30 Mar 2011 09:27:23 +0000 (+0000) Subject: [packages] quagga: Renumber patches X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2fe10282de1ff24b244265eac11c17a438b3bae5;p=openwrt%2Fsvn-archive%2Farchive.git [packages] quagga: Renumber patches SVN-Revision: 26362 --- diff --git a/net/quagga/patches/000-fix-format-warnings.patch b/net/quagga/patches/000-fix-format-warnings.patch deleted file mode 100644 index ac05e1720d..0000000000 --- a/net/quagga/patches/000-fix-format-warnings.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/lib/command.c -+++ b/lib/command.c -@@ -3056,7 +3056,7 @@ DEFUN (config_logmsg, - if ((level = level_match(argv[0])) == ZLOG_DISABLED) - return CMD_ERR_NO_MATCH; - -- zlog(NULL, level, ((message = argv_concat(argv, argc, 1)) ? message : "")); -+ zlog(NULL, level, "%s", ((message = argv_concat(argv, argc, 1)) ? message : "")); - if (message) - XFREE(MTYPE_TMP, message); - return CMD_SUCCESS; ---- a/lib/if.c -+++ b/lib/if.c -@@ -664,7 +664,7 @@ connected_log (struct connected *connect - strncat (logbuf, inet_ntop (p->family, &p->u.prefix, buf, BUFSIZ), - BUFSIZ - strlen(logbuf)); - } -- zlog (NULL, LOG_INFO, logbuf); -+ zlog (NULL, LOG_INFO, "%s", logbuf); - } - - /* If two connected address has same prefix return 1. */ diff --git a/net/quagga/patches/000-fix-ipv6-build-failure.patch b/net/quagga/patches/000-fix-ipv6-build-failure.patch deleted file mode 100644 index 6c3ac78d7c..0000000000 --- a/net/quagga/patches/000-fix-ipv6-build-failure.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/bgpd/bgp_route.c -+++ b/bgpd/bgp_route.c -@@ -4327,6 +4327,7 @@ ALIAS_DEPRECATED (no_bgp_network_mask_na - "Specify a BGP backdoor route\n" - "AS-Path hopcount limit attribute\n" - "AS-Pathlimit TTL, in number of AS-Path hops\n") -+#ifdef HAVE_IPV6 - ALIAS_DEPRECATED (ipv6_bgp_network, - ipv6_bgp_network_ttl_cmd, - "network X:X::X:X/M pathlimit <0-255>", -@@ -4342,6 +4343,7 @@ ALIAS_DEPRECATED (no_ipv6_bgp_network, - "IPv6 prefix /\n" - "AS-Path hopcount limit attribute\n" - "AS-Pathlimit TTL, in number of AS-Path hops\n") -+#endif /* HAVE_IPV6 */ - - /* Aggreagete address: - -@@ -12133,9 +12135,11 @@ bgp_route_init (void) - install_element (BGP_IPV4M_NODE, &no_bgp_network_backdoor_ttl_cmd); - install_element (BGP_IPV4M_NODE, &no_bgp_network_mask_backdoor_ttl_cmd); - install_element (BGP_IPV4M_NODE, &no_bgp_network_mask_natural_backdoor_ttl_cmd); -- -+ -+#ifdef HAVE_IPV6 - install_element (BGP_IPV6_NODE, &ipv6_bgp_network_ttl_cmd); - install_element (BGP_IPV6_NODE, &no_ipv6_bgp_network_ttl_cmd); -+#endif - } - - void diff --git a/net/quagga/patches/000-fix-opaque-support.patch b/net/quagga/patches/000-fix-opaque-support.patch deleted file mode 100644 index ba0081c9d2..0000000000 --- a/net/quagga/patches/000-fix-opaque-support.patch +++ /dev/null @@ -1,91 +0,0 @@ ---- a/ospfd/ospf_lsa.h -+++ b/ospfd/ospf_lsa.h -@@ -114,6 +114,9 @@ struct ospf_lsa - - /* Refreshement List or Queue */ - int refresh_list; -+ -+ /* For Type-9 Opaque-LSAs */ -+ struct ospf_interface *oi; - }; - - /* OSPF LSA Link Type. */ ---- a/ospfd/ospf_nsm.c -+++ b/ospfd/ospf_nsm.c -@@ -216,7 +216,7 @@ ospf_db_summary_add (struct ospf_neighbo - { - case OSPF_OPAQUE_LINK_LSA: - /* Exclude type-9 LSAs that does not have the same "oi" with "nbr". */ -- if (lsa->oi != nbr->oi) -+ if (nbr->oi && ospf_if_exists (lsa->oi) != nbr->oi) - return 0; - break; - case OSPF_OPAQUE_AREA_LSA: ---- a/ospfd/ospf_opaque.c -+++ b/ospfd/ospf_opaque.c -@@ -251,7 +251,7 @@ struct ospf_opaque_functab - void (* config_write_debug )(struct vty *vty); - void (* show_opaque_info )(struct vty *vty, struct ospf_lsa *lsa); - int (* lsa_originator)(void *arg); -- void (* lsa_refresher )(struct ospf_lsa *lsa); -+ struct ospf_lsa *(* lsa_refresher )(struct ospf_lsa *lsa); - int (* new_lsa_hook)(struct ospf_lsa *lsa); - int (* del_lsa_hook)(struct ospf_lsa *lsa); - }; -@@ -354,7 +354,7 @@ ospf_register_opaque_functab ( - void (* config_write_debug )(struct vty *vty), - void (* show_opaque_info )(struct vty *vty, struct ospf_lsa *lsa), - int (* lsa_originator)(void *arg), -- void (* lsa_refresher )(struct ospf_lsa *lsa), -+ struct ospf_lsa *(* lsa_refresher )(struct ospf_lsa *lsa), - int (* new_lsa_hook)(struct ospf_lsa *lsa), - int (* del_lsa_hook)(struct ospf_lsa *lsa)) - { -@@ -1608,12 +1608,13 @@ out: - return new; - } - --void -+struct ospf_lsa * - ospf_opaque_lsa_refresh (struct ospf_lsa *lsa) - { - struct ospf *ospf; - struct ospf_opaque_functab *functab; -- -+ struct ospf_lsa *new = NULL; -+ - ospf = ospf_lookup (); - - if ((functab = ospf_opaque_functab_lookup (lsa)) == NULL -@@ -1633,9 +1634,9 @@ ospf_opaque_lsa_refresh (struct ospf_lsa - ospf_lsa_flush (ospf, lsa); - } - else -- (* functab->lsa_refresher)(lsa); -+ new = (* functab->lsa_refresher)(lsa); - -- return; -+ return new; - } - - /*------------------------------------------------------------------------* ---- a/ospfd/ospf_opaque.h -+++ b/ospfd/ospf_opaque.h -@@ -120,7 +120,7 @@ ospf_register_opaque_functab ( - void (* config_write_debug )(struct vty *vty), - void (* show_opaque_info )(struct vty *vty, struct ospf_lsa *lsa), - int (* lsa_originator)(void *arg), -- void (* lsa_refresher )(struct ospf_lsa *lsa), -+ struct ospf_lsa *(* lsa_refresher )(struct ospf_lsa *lsa), - int (* new_lsa_hook)(struct ospf_lsa *lsa), - int (* del_lsa_hook)(struct ospf_lsa *lsa) - ); -@@ -143,7 +143,7 @@ extern void ospf_opaque_lsa_originate_sc - int *init_delay); - extern struct ospf_lsa *ospf_opaque_lsa_install (struct ospf_lsa *, - int rt_recalc); --extern void ospf_opaque_lsa_refresh (struct ospf_lsa *lsa); -+extern struct ospf_lsa *ospf_opaque_lsa_refresh (struct ospf_lsa *lsa); - - extern void ospf_opaque_lsa_reoriginate_schedule (void *lsa_type_dependent, - u_char lsa_type, diff --git a/net/quagga/patches/001-fix_ipctl_forwarding.patch b/net/quagga/patches/001-fix_ipctl_forwarding.patch deleted file mode 100644 index d757312da9..0000000000 --- a/net/quagga/patches/001-fix_ipctl_forwarding.patch +++ /dev/null @@ -1,25 +0,0 @@ -Add definitions for IPCTL_FORWARDING and IP6CTL_FORWARDING. - -Inspired from -http://svn.gnumonks.org/trunk/grouter/build/src/quagga/quagga/quagga-0.99.1-forward_sysctl-2.6.14.patch - -Signed-off-by: Thomas Petazzoni - ---- a/zebra/ipforward_sysctl.c -+++ b/zebra/ipforward_sysctl.c -@@ -31,6 +31,15 @@ - - #define MIB_SIZ 4 - -+/* Fix for recent (2.6.14) kernel headers */ -+#ifndef IPCTL_FORWARDING -+#define IPCTL_FORWARDING NET_IPV4_FORWARD -+#endif -+ -+#ifndef IP6CTL_FORWARDING -+#define IP6CTL_FORWARDING NET_IPV6_FORWARDING -+#endif -+ - extern struct zebra_privs_t zserv_privs; - - /* IPv4 forwarding control MIB. */ diff --git a/net/quagga/patches/002-quagga_manet.patch b/net/quagga/patches/002-quagga_manet.patch deleted file mode 100644 index c32af31f33..0000000000 --- a/net/quagga/patches/002-quagga_manet.patch +++ /dev/null @@ -1,845 +0,0 @@ ---- a/bgpd/bgp_vty.c -+++ b/bgpd/bgp_vty.c -@@ -8228,8 +8228,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) - { -@@ -8241,21 +8247,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; - -@@ -8270,13 +8285,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") - { -@@ -8295,13 +8313,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") - { -@@ -8322,13 +8343,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" -@@ -8352,13 +8376,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" -@@ -8382,14 +8409,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; - -@@ -8405,7 +8435,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" -@@ -8413,6 +8443,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") - { -@@ -8431,7 +8464,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" -@@ -8439,6 +8472,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") - { -@@ -8457,7 +8493,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" -@@ -8465,6 +8501,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" -@@ -8486,7 +8525,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" -@@ -8494,6 +8533,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" -@@ -8502,13 +8544,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; - -@@ -8524,13 +8569,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") - { -@@ -8549,13 +8597,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") - { -@@ -8576,13 +8627,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" -@@ -8606,13 +8660,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" -@@ -8636,14 +8693,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; - -@@ -8659,7 +8719,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" -@@ -8667,6 +8727,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") - { -@@ -8685,7 +8748,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" -@@ -8693,6 +8756,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") - { -@@ -8711,7 +8777,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" -@@ -8719,6 +8785,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" -@@ -8740,7 +8809,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" -@@ -8748,6 +8817,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 -@@ -838,6 +838,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 - ---- 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_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 --# we want to disable for them for general Quagga distribution. --# This at least makes it trivial for users of these protocols --# 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_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" - - ## help strings - ZEBRA_ROUTE_SYSTEM, "Reserved route type, for internal use only" -@@ -71,4 +67,5 @@ 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 -@@ -441,7 +441,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; - ---- a/ripd/rip_zebra.c -+++ b/ripd/rip_zebra.c -@@ -204,8 +204,11 @@ 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_HSLS, 1, "hsls"}, -+ {ZEBRA_ROUTE_OLSR, 2, "olsr"}, -+ {ZEBRA_ROUTE_BATMAN, 2, "batman"}, - {0, 0, NULL} - }; - ---- a/ripngd/ripng_zebra.c -+++ b/ripngd/ripng_zebra.c -@@ -214,8 +214,11 @@ 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_HSLS, 1, "hsls"}, -+ {ZEBRA_ROUTE_OLSR, 2, "olsr"}, -+ {ZEBRA_ROUTE_BATMAN, 2, "batman"}, - {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/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} - }; - - /* Vector for routing table. */ -@@ -1229,6 +1232,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, - }; - - /* 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) - return 1; /* shouldn't happen */ - case ZEBRA_ROUTE_BGP: - return 14; /* bgp */ -+ case ZEBRA_ROUTE_HSLS: -+ return 1; /* other */ -+ case ZEBRA_ROUTE_OLSR: -+ return 1; /* other */ -+ case ZEBRA_ROUTE_BATMAN: -+ return 1; /* other */ - default: - return 1; /* other */ - } ---- 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 - || rib->type == ZEBRA_ROUTE_OSPF - || rib->type == ZEBRA_ROUTE_ISIS -- || rib->type == ZEBRA_ROUTE_BGP) -+ || rib->type == ZEBRA_ROUTE_BGP -+ || rib->type == ZEBRA_ROUTE_HSLS -+ || rib->type == ZEBRA_ROUTE_OLSR -+ || rib->type == ZEBRA_ROUTE_BATMAN) - { - time_t uptime; - struct tm *tm; -@@ -775,7 +778,10 @@ vty_show_ip_route (struct vty *vty, stru - if (rib->type == ZEBRA_ROUTE_RIP - || rib->type == ZEBRA_ROUTE_OSPF - || rib->type == ZEBRA_ROUTE_ISIS -- || rib->type == ZEBRA_ROUTE_BGP) -+ || rib->type == ZEBRA_ROUTE_BGP -+ || rib->type == ZEBRA_ROUTE_HSLS -+ || rib->type == ZEBRA_ROUTE_OLSR -+ || rib->type == ZEBRA_ROUTE_BATMAN) - { - 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 - || rib->type == ZEBRA_ROUTE_OSPF6 - || rib->type == ZEBRA_ROUTE_ISIS -- || rib->type == ZEBRA_ROUTE_BGP) -+ || rib->type == ZEBRA_ROUTE_BGP -+ || rib->type == ZEBRA_ROUTE_HSLS -+ || rib->type == ZEBRA_ROUTE_OLSR -+ || rib->type == ZEBRA_ROUTE_BATMAN) - { - time_t uptime; - struct tm *tm; -@@ -1739,7 +1754,10 @@ vty_show_ipv6_route (struct vty *vty, st - if (rib->type == ZEBRA_ROUTE_RIPNG - || rib->type == ZEBRA_ROUTE_OSPF6 - || rib->type == ZEBRA_ROUTE_ISIS -- || rib->type == ZEBRA_ROUTE_BGP) -+ || rib->type == ZEBRA_ROUTE_BGP -+ || rib->type == ZEBRA_ROUTE_HSLS -+ || rib->type == ZEBRA_ROUTE_OLSR -+ || rib->type == ZEBRA_ROUTE_BATMAN) - { - 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); diff --git a/net/quagga/patches/010-fix-format-warnings.patch b/net/quagga/patches/010-fix-format-warnings.patch new file mode 100644 index 0000000000..ac05e1720d --- /dev/null +++ b/net/quagga/patches/010-fix-format-warnings.patch @@ -0,0 +1,22 @@ +--- a/lib/command.c ++++ b/lib/command.c +@@ -3056,7 +3056,7 @@ DEFUN (config_logmsg, + if ((level = level_match(argv[0])) == ZLOG_DISABLED) + return CMD_ERR_NO_MATCH; + +- zlog(NULL, level, ((message = argv_concat(argv, argc, 1)) ? message : "")); ++ zlog(NULL, level, "%s", ((message = argv_concat(argv, argc, 1)) ? message : "")); + if (message) + XFREE(MTYPE_TMP, message); + return CMD_SUCCESS; +--- a/lib/if.c ++++ b/lib/if.c +@@ -664,7 +664,7 @@ connected_log (struct connected *connect + strncat (logbuf, inet_ntop (p->family, &p->u.prefix, buf, BUFSIZ), + BUFSIZ - strlen(logbuf)); + } +- zlog (NULL, LOG_INFO, logbuf); ++ zlog (NULL, LOG_INFO, "%s", logbuf); + } + + /* If two connected address has same prefix return 1. */ diff --git a/net/quagga/patches/010-fix_cpp.patch b/net/quagga/patches/010-fix_cpp.patch deleted file mode 100644 index 3660bf898a..0000000000 --- a/net/quagga/patches/010-fix_cpp.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/vtysh/extract.pl.in -+++ b/vtysh/extract.pl.in -@@ -62,7 +62,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 |"); - local $/; undef $/; - $line = ; - close (FH); diff --git a/net/quagga/patches/020-fix-ipv6-build-failure.patch b/net/quagga/patches/020-fix-ipv6-build-failure.patch new file mode 100644 index 0000000000..6c3ac78d7c --- /dev/null +++ b/net/quagga/patches/020-fix-ipv6-build-failure.patch @@ -0,0 +1,31 @@ +--- a/bgpd/bgp_route.c ++++ b/bgpd/bgp_route.c +@@ -4327,6 +4327,7 @@ ALIAS_DEPRECATED (no_bgp_network_mask_na + "Specify a BGP backdoor route\n" + "AS-Path hopcount limit attribute\n" + "AS-Pathlimit TTL, in number of AS-Path hops\n") ++#ifdef HAVE_IPV6 + ALIAS_DEPRECATED (ipv6_bgp_network, + ipv6_bgp_network_ttl_cmd, + "network X:X::X:X/M pathlimit <0-255>", +@@ -4342,6 +4343,7 @@ ALIAS_DEPRECATED (no_ipv6_bgp_network, + "IPv6 prefix /\n" + "AS-Path hopcount limit attribute\n" + "AS-Pathlimit TTL, in number of AS-Path hops\n") ++#endif /* HAVE_IPV6 */ + + /* Aggreagete address: + +@@ -12133,9 +12135,11 @@ bgp_route_init (void) + install_element (BGP_IPV4M_NODE, &no_bgp_network_backdoor_ttl_cmd); + install_element (BGP_IPV4M_NODE, &no_bgp_network_mask_backdoor_ttl_cmd); + install_element (BGP_IPV4M_NODE, &no_bgp_network_mask_natural_backdoor_ttl_cmd); +- ++ ++#ifdef HAVE_IPV6 + install_element (BGP_IPV6_NODE, &ipv6_bgp_network_ttl_cmd); + install_element (BGP_IPV6_NODE, &no_ipv6_bgp_network_ttl_cmd); ++#endif + } + + void diff --git a/net/quagga/patches/030-fix-opaque-support.patch b/net/quagga/patches/030-fix-opaque-support.patch new file mode 100644 index 0000000000..ba0081c9d2 --- /dev/null +++ b/net/quagga/patches/030-fix-opaque-support.patch @@ -0,0 +1,91 @@ +--- a/ospfd/ospf_lsa.h ++++ b/ospfd/ospf_lsa.h +@@ -114,6 +114,9 @@ struct ospf_lsa + + /* Refreshement List or Queue */ + int refresh_list; ++ ++ /* For Type-9 Opaque-LSAs */ ++ struct ospf_interface *oi; + }; + + /* OSPF LSA Link Type. */ +--- a/ospfd/ospf_nsm.c ++++ b/ospfd/ospf_nsm.c +@@ -216,7 +216,7 @@ ospf_db_summary_add (struct ospf_neighbo + { + case OSPF_OPAQUE_LINK_LSA: + /* Exclude type-9 LSAs that does not have the same "oi" with "nbr". */ +- if (lsa->oi != nbr->oi) ++ if (nbr->oi && ospf_if_exists (lsa->oi) != nbr->oi) + return 0; + break; + case OSPF_OPAQUE_AREA_LSA: +--- a/ospfd/ospf_opaque.c ++++ b/ospfd/ospf_opaque.c +@@ -251,7 +251,7 @@ struct ospf_opaque_functab + void (* config_write_debug )(struct vty *vty); + void (* show_opaque_info )(struct vty *vty, struct ospf_lsa *lsa); + int (* lsa_originator)(void *arg); +- void (* lsa_refresher )(struct ospf_lsa *lsa); ++ struct ospf_lsa *(* lsa_refresher )(struct ospf_lsa *lsa); + int (* new_lsa_hook)(struct ospf_lsa *lsa); + int (* del_lsa_hook)(struct ospf_lsa *lsa); + }; +@@ -354,7 +354,7 @@ ospf_register_opaque_functab ( + void (* config_write_debug )(struct vty *vty), + void (* show_opaque_info )(struct vty *vty, struct ospf_lsa *lsa), + int (* lsa_originator)(void *arg), +- void (* lsa_refresher )(struct ospf_lsa *lsa), ++ struct ospf_lsa *(* lsa_refresher )(struct ospf_lsa *lsa), + int (* new_lsa_hook)(struct ospf_lsa *lsa), + int (* del_lsa_hook)(struct ospf_lsa *lsa)) + { +@@ -1608,12 +1608,13 @@ out: + return new; + } + +-void ++struct ospf_lsa * + ospf_opaque_lsa_refresh (struct ospf_lsa *lsa) + { + struct ospf *ospf; + struct ospf_opaque_functab *functab; +- ++ struct ospf_lsa *new = NULL; ++ + ospf = ospf_lookup (); + + if ((functab = ospf_opaque_functab_lookup (lsa)) == NULL +@@ -1633,9 +1634,9 @@ ospf_opaque_lsa_refresh (struct ospf_lsa + ospf_lsa_flush (ospf, lsa); + } + else +- (* functab->lsa_refresher)(lsa); ++ new = (* functab->lsa_refresher)(lsa); + +- return; ++ return new; + } + + /*------------------------------------------------------------------------* +--- a/ospfd/ospf_opaque.h ++++ b/ospfd/ospf_opaque.h +@@ -120,7 +120,7 @@ ospf_register_opaque_functab ( + void (* config_write_debug )(struct vty *vty), + void (* show_opaque_info )(struct vty *vty, struct ospf_lsa *lsa), + int (* lsa_originator)(void *arg), +- void (* lsa_refresher )(struct ospf_lsa *lsa), ++ struct ospf_lsa *(* lsa_refresher )(struct ospf_lsa *lsa), + int (* new_lsa_hook)(struct ospf_lsa *lsa), + int (* del_lsa_hook)(struct ospf_lsa *lsa) + ); +@@ -143,7 +143,7 @@ extern void ospf_opaque_lsa_originate_sc + int *init_delay); + extern struct ospf_lsa *ospf_opaque_lsa_install (struct ospf_lsa *, + int rt_recalc); +-extern void ospf_opaque_lsa_refresh (struct ospf_lsa *lsa); ++extern struct ospf_lsa *ospf_opaque_lsa_refresh (struct ospf_lsa *lsa); + + extern void ospf_opaque_lsa_reoriginate_schedule (void *lsa_type_dependent, + u_char lsa_type, diff --git a/net/quagga/patches/110-fix_ipctl_forwarding.patch b/net/quagga/patches/110-fix_ipctl_forwarding.patch new file mode 100644 index 0000000000..d757312da9 --- /dev/null +++ b/net/quagga/patches/110-fix_ipctl_forwarding.patch @@ -0,0 +1,25 @@ +Add definitions for IPCTL_FORWARDING and IP6CTL_FORWARDING. + +Inspired from +http://svn.gnumonks.org/trunk/grouter/build/src/quagga/quagga/quagga-0.99.1-forward_sysctl-2.6.14.patch + +Signed-off-by: Thomas Petazzoni + +--- a/zebra/ipforward_sysctl.c ++++ b/zebra/ipforward_sysctl.c +@@ -31,6 +31,15 @@ + + #define MIB_SIZ 4 + ++/* Fix for recent (2.6.14) kernel headers */ ++#ifndef IPCTL_FORWARDING ++#define IPCTL_FORWARDING NET_IPV4_FORWARD ++#endif ++ ++#ifndef IP6CTL_FORWARDING ++#define IP6CTL_FORWARDING NET_IPV6_FORWARDING ++#endif ++ + extern struct zebra_privs_t zserv_privs; + + /* IPv4 forwarding control MIB. */ diff --git a/net/quagga/patches/120-quagga_manet.patch b/net/quagga/patches/120-quagga_manet.patch new file mode 100644 index 0000000000..c32af31f33 --- /dev/null +++ b/net/quagga/patches/120-quagga_manet.patch @@ -0,0 +1,845 @@ +--- a/bgpd/bgp_vty.c ++++ b/bgpd/bgp_vty.c +@@ -8228,8 +8228,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) + { +@@ -8241,21 +8247,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; + +@@ -8270,13 +8285,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") + { +@@ -8295,13 +8313,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") + { +@@ -8322,13 +8343,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" +@@ -8352,13 +8376,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" +@@ -8382,14 +8409,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; + +@@ -8405,7 +8435,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" +@@ -8413,6 +8443,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") + { +@@ -8431,7 +8464,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" +@@ -8439,6 +8472,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") + { +@@ -8457,7 +8493,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" +@@ -8465,6 +8501,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" +@@ -8486,7 +8525,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" +@@ -8494,6 +8533,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" +@@ -8502,13 +8544,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; + +@@ -8524,13 +8569,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") + { +@@ -8549,13 +8597,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") + { +@@ -8576,13 +8627,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" +@@ -8606,13 +8660,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" +@@ -8636,14 +8693,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; + +@@ -8659,7 +8719,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" +@@ -8667,6 +8727,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") + { +@@ -8685,7 +8748,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" +@@ -8693,6 +8756,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") + { +@@ -8711,7 +8777,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" +@@ -8719,6 +8785,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" +@@ -8740,7 +8809,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" +@@ -8748,6 +8817,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 +@@ -838,6 +838,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 + +--- 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_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 +-# we want to disable for them for general Quagga distribution. +-# This at least makes it trivial for users of these protocols +-# 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_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" + + ## help strings + ZEBRA_ROUTE_SYSTEM, "Reserved route type, for internal use only" +@@ -71,4 +67,5 @@ 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 +@@ -441,7 +441,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; + +--- a/ripd/rip_zebra.c ++++ b/ripd/rip_zebra.c +@@ -204,8 +204,11 @@ 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_HSLS, 1, "hsls"}, ++ {ZEBRA_ROUTE_OLSR, 2, "olsr"}, ++ {ZEBRA_ROUTE_BATMAN, 2, "batman"}, + {0, 0, NULL} + }; + +--- a/ripngd/ripng_zebra.c ++++ b/ripngd/ripng_zebra.c +@@ -214,8 +214,11 @@ 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_HSLS, 1, "hsls"}, ++ {ZEBRA_ROUTE_OLSR, 2, "olsr"}, ++ {ZEBRA_ROUTE_BATMAN, 2, "batman"}, + {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/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} + }; + + /* Vector for routing table. */ +@@ -1229,6 +1232,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, + }; + + /* 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) + return 1; /* shouldn't happen */ + case ZEBRA_ROUTE_BGP: + return 14; /* bgp */ ++ case ZEBRA_ROUTE_HSLS: ++ return 1; /* other */ ++ case ZEBRA_ROUTE_OLSR: ++ return 1; /* other */ ++ case ZEBRA_ROUTE_BATMAN: ++ return 1; /* other */ + default: + return 1; /* other */ + } +--- 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 + || rib->type == ZEBRA_ROUTE_OSPF + || rib->type == ZEBRA_ROUTE_ISIS +- || rib->type == ZEBRA_ROUTE_BGP) ++ || rib->type == ZEBRA_ROUTE_BGP ++ || rib->type == ZEBRA_ROUTE_HSLS ++ || rib->type == ZEBRA_ROUTE_OLSR ++ || rib->type == ZEBRA_ROUTE_BATMAN) + { + time_t uptime; + struct tm *tm; +@@ -775,7 +778,10 @@ vty_show_ip_route (struct vty *vty, stru + if (rib->type == ZEBRA_ROUTE_RIP + || rib->type == ZEBRA_ROUTE_OSPF + || rib->type == ZEBRA_ROUTE_ISIS +- || rib->type == ZEBRA_ROUTE_BGP) ++ || rib->type == ZEBRA_ROUTE_BGP ++ || rib->type == ZEBRA_ROUTE_HSLS ++ || rib->type == ZEBRA_ROUTE_OLSR ++ || rib->type == ZEBRA_ROUTE_BATMAN) + { + 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 + || rib->type == ZEBRA_ROUTE_OSPF6 + || rib->type == ZEBRA_ROUTE_ISIS +- || rib->type == ZEBRA_ROUTE_BGP) ++ || rib->type == ZEBRA_ROUTE_BGP ++ || rib->type == ZEBRA_ROUTE_HSLS ++ || rib->type == ZEBRA_ROUTE_OLSR ++ || rib->type == ZEBRA_ROUTE_BATMAN) + { + time_t uptime; + struct tm *tm; +@@ -1739,7 +1754,10 @@ vty_show_ipv6_route (struct vty *vty, st + if (rib->type == ZEBRA_ROUTE_RIPNG + || rib->type == ZEBRA_ROUTE_OSPF6 + || rib->type == ZEBRA_ROUTE_ISIS +- || rib->type == ZEBRA_ROUTE_BGP) ++ || rib->type == ZEBRA_ROUTE_BGP ++ || rib->type == ZEBRA_ROUTE_HSLS ++ || rib->type == ZEBRA_ROUTE_OLSR ++ || rib->type == ZEBRA_ROUTE_BATMAN) + { + 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); diff --git a/net/quagga/patches/130-fix_cpp.patch b/net/quagga/patches/130-fix_cpp.patch new file mode 100644 index 0000000000..3660bf898a --- /dev/null +++ b/net/quagga/patches/130-fix_cpp.patch @@ -0,0 +1,11 @@ +--- a/vtysh/extract.pl.in ++++ b/vtysh/extract.pl.in +@@ -62,7 +62,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 |"); + local $/; undef $/; + $line = ; + close (FH);