From 1b8dfe266937a37a4c642f96ceb2347bf4c00a17 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Fri, 10 Oct 2014 03:20:04 +0200 Subject: initial commit for Enea Linux 4.0-140929 Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea --- ...c-zebra-routing-table-with-the-kernel-one.patch | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 meta-networking/recipes-protocols/quagga/files/Zebra-sync-zebra-routing-table-with-the-kernel-one.patch (limited to 'meta-networking/recipes-protocols/quagga/files/Zebra-sync-zebra-routing-table-with-the-kernel-one.patch') diff --git a/meta-networking/recipes-protocols/quagga/files/Zebra-sync-zebra-routing-table-with-the-kernel-one.patch b/meta-networking/recipes-protocols/quagga/files/Zebra-sync-zebra-routing-table-with-the-kernel-one.patch new file mode 100644 index 0000000000..35f4637d8e --- /dev/null +++ b/meta-networking/recipes-protocols/quagga/files/Zebra-sync-zebra-routing-table-with-the-kernel-one.patch @@ -0,0 +1,48 @@ +sync zebra routing table with the kernel one when interface is down + +Add router to kernel main router table with "ip", then you can see +a router item in kernel main router table. Also can see this router +item in zebra router table. If down the interface, this router item +will be deleted from kernel main router table, but it will not be +deleted from zebra router table, just set as inactive. + +This patch is adopted from [1]. +[1] http://www.gossamer-threads.com/lists/quagga/dev/22609 + +Upstream-Status: Pending + +Signed-of-by: Aws Ismail +Signed-of-by: Roy.Li + +--- + zebra/zebra_rib.c | 7 +++++++ + 1 files changed, 7 insertions(+), 0 deletions(-) + +diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c +index 154e8d5..63434d0 100644 +--- a/zebra/zebra_rib.c ++++ b/zebra/zebra_rib.c +@@ -765,6 +765,9 @@ rib_match_ipv6 (struct in6_addr *addr) + #define RIB_SYSTEM_ROUTE(R) \ + ((R)->type == ZEBRA_ROUTE_KERNEL || (R)->type == ZEBRA_ROUTE_CONNECT) + ++#define RIB_KERNEL_ROUTE(R) \ ++ ((R)->type == ZEBRA_ROUTE_KERNEL) ++ + /* This function verifies reachability of one given nexthop, which can be + * numbered or unnumbered, IPv4 or IPv6. The result is unconditionally stored + * in nexthop->flags field. If the 4th parameter, 'set', is non-zero, +@@ -1135,6 +1138,10 @@ rib_process (struct route_node *rn) + redistribute_delete (&rn->p, fib); + if (! RIB_SYSTEM_ROUTE (fib)) + rib_uninstall_kernel (rn, fib); ++#ifdef GNU_LINUX ++ else if(RIB_KERNEL_ROUTE (fib) && !if_is_up(if_lookup_by_index(fib->nexthop->ifindex))) ++ del=fib; ++#endif + UNSET_FLAG (fib->flags, ZEBRA_FLAG_SELECTED); + + /* Set real nexthop. */ +-- +1.7.4.1 + -- cgit v1.2.3-54-g00ecf