* [meta-networking][PATCH 0/1] Quagga: sync zebra routing table with the
@ 2013-05-06 18:06 Aws Ismail
2013-05-06 18:06 ` [meta-networking][PATCH 1/1] Quagga: sync zebra routing table with the kernel one Aws Ismail
2013-05-07 16:43 ` [meta-networking][PATCH 0/1] Quagga: sync zebra routing table with the Joe MacDonald
0 siblings, 2 replies; 3+ messages in thread
From: Aws Ismail @ 2013-05-06 18:06 UTC (permalink / raw)
To: openembedded-devel; +Cc: joe.macdonald
When interface goes down, and there are some static routes that are
made with ip route, they are going to be deleted from kernel fib.
That's what kernel does by default. But they are not going to be
deleted from zebra's fib. They will be declared inactive.
This issue was originally discussed in [1] and a patch was proposed.
[1] http://www.gossamer-threads.com/lists/quagga/dev/22609
Aws Ismail (1):
Quagga: sync zebra routing table with the kernel one
...c-zebra-routing-table-with-the-kernel-one.patch | 48 ++++++++++++++++++++
.../recipes-protocols/quagga/quagga.inc | 3 +-
2 files changed, 50 insertions(+), 1 deletions(-)
create mode 100644 meta-networking/recipes-protocols/quagga/files/Zebra-sync-zebra-routing-table-with-the-kernel-one.patch
^ permalink raw reply [flat|nested] 3+ messages in thread
* [meta-networking][PATCH 1/1] Quagga: sync zebra routing table with the kernel one
2013-05-06 18:06 [meta-networking][PATCH 0/1] Quagga: sync zebra routing table with the Aws Ismail
@ 2013-05-06 18:06 ` Aws Ismail
2013-05-07 16:43 ` [meta-networking][PATCH 0/1] Quagga: sync zebra routing table with the Joe MacDonald
1 sibling, 0 replies; 3+ messages in thread
From: Aws Ismail @ 2013-05-06 18:06 UTC (permalink / raw)
To: openembedded-devel; +Cc: joe.macdonald
When interface goes down, and there are some static routes that are
made with ip route, they are going to be deleted from kernel fib.
That's what kernel does by default. But they are not going to be
deleted from zebra's fib. They will be declared inactive.
This issue was originally discussed in [1] and a patch was proposed.
[1] http://www.gossamer-threads.com/lists/quagga/dev/22609
Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
---
...c-zebra-routing-table-with-the-kernel-one.patch | 48 ++++++++++++++++++++
.../recipes-protocols/quagga/quagga.inc | 3 +-
2 files changed, 50 insertions(+), 1 deletions(-)
create mode 100644 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 0000000..35f4637
--- /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 <aws.ismail@windriver.com>
+Signed-of-by: Roy.Li <rongqing.li@windriver.com>
+
+---
+ 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
+
diff --git a/meta-networking/recipes-protocols/quagga/quagga.inc b/meta-networking/recipes-protocols/quagga/quagga.inc
index 160c458..f9a32a9 100644
--- a/meta-networking/recipes-protocols/quagga/quagga.inc
+++ b/meta-networking/recipes-protocols/quagga/quagga.inc
@@ -15,7 +15,7 @@ SNMP_CONF="${@base_contains('DISTRO_FEATURES', 'snmp', '--enable-snmp', '', d)}"
LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
file://COPYING.LIB;md5=f30a9716ef3762e3467a2f62bf790f0a"
-INC_PR = "r1"
+INC_PR = "r2"
QUAGGASUBDIR = ""
# ${QUAGGASUBDIR} is deal with old versions. Set to "/attic" for old
@@ -23,6 +23,7 @@ QUAGGASUBDIR = ""
SRC_URI = "http://download.savannah.gnu.org/releases/quagga${QUAGGASUBDIR}/quagga-${PV}.tar.gz;name=quagga-${PV} \
file://fix-for-lib-inpath.patch \
file://quagga-0.99.17-libcap.patch \
+ file://Zebra-sync-zebra-routing-table-with-the-kernel-one.patch \
file://quagga.init \
file://quagga.default \
file://watchquagga.init \
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [meta-networking][PATCH 0/1] Quagga: sync zebra routing table with the
2013-05-06 18:06 [meta-networking][PATCH 0/1] Quagga: sync zebra routing table with the Aws Ismail
2013-05-06 18:06 ` [meta-networking][PATCH 1/1] Quagga: sync zebra routing table with the kernel one Aws Ismail
@ 2013-05-07 16:43 ` Joe MacDonald
1 sibling, 0 replies; 3+ messages in thread
From: Joe MacDonald @ 2013-05-07 16:43 UTC (permalink / raw)
To: Aws Ismail; +Cc: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 996 bytes --]
[[meta-networking][PATCH 0/1] Quagga: sync zebra routing table with the] On 13.05.06 (Mon 14:06) Aws Ismail wrote:
> When interface goes down, and there are some static routes that are
> made with ip route, they are going to be deleted from kernel fib.
> That's what kernel does by default. But they are not going to be
> deleted from zebra's fib. They will be declared inactive.
>
> This issue was originally discussed in [1] and a patch was proposed.
>
> [1] http://www.gossamer-threads.com/lists/quagga/dev/22609
>
> Aws Ismail (1):
> Quagga: sync zebra routing table with the kernel one
>
> ...c-zebra-routing-table-with-the-kernel-one.patch | 48 ++++++++++++++++++++
> .../recipes-protocols/quagga/quagga.inc | 3 +-
> 2 files changed, 50 insertions(+), 1 deletions(-)
> create mode 100644 meta-networking/recipes-protocols/quagga/files/Zebra-sync-zebra-routing-table-with-the-kernel-one.patch
>
Merged, thanks.
--
-Joe MacDonald.
:wq
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-05-07 17:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-06 18:06 [meta-networking][PATCH 0/1] Quagga: sync zebra routing table with the Aws Ismail
2013-05-06 18:06 ` [meta-networking][PATCH 1/1] Quagga: sync zebra routing table with the kernel one Aws Ismail
2013-05-07 16:43 ` [meta-networking][PATCH 0/1] Quagga: sync zebra routing table with the Joe MacDonald
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox