diff options
Diffstat (limited to 'meta-networking/recipes-protocols/quagga')
-rw-r--r-- | meta-networking/recipes-protocols/quagga/files/Zebra-sync-zebra-routing-table-with-the-kernel-one.patch | 48 | ||||
-rw-r--r-- | meta-networking/recipes-protocols/quagga/quagga.inc | 3 |
2 files changed, 50 insertions, 1 deletions
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 000000000..35f4637d8 --- /dev/null +++ b/meta-networking/recipes-protocols/quagga/files/Zebra-sync-zebra-routing-table-with-the-kernel-one.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | sync zebra routing table with the kernel one when interface is down | ||
2 | |||
3 | Add router to kernel main router table with "ip", then you can see | ||
4 | a router item in kernel main router table. Also can see this router | ||
5 | item in zebra router table. If down the interface, this router item | ||
6 | will be deleted from kernel main router table, but it will not be | ||
7 | deleted from zebra router table, just set as inactive. | ||
8 | |||
9 | This patch is adopted from [1]. | ||
10 | [1] http://www.gossamer-threads.com/lists/quagga/dev/22609 | ||
11 | |||
12 | Upstream-Status: Pending | ||
13 | |||
14 | Signed-of-by: Aws Ismail <aws.ismail@windriver.com> | ||
15 | Signed-of-by: Roy.Li <rongqing.li@windriver.com> | ||
16 | |||
17 | --- | ||
18 | zebra/zebra_rib.c | 7 +++++++ | ||
19 | 1 files changed, 7 insertions(+), 0 deletions(-) | ||
20 | |||
21 | diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c | ||
22 | index 154e8d5..63434d0 100644 | ||
23 | --- a/zebra/zebra_rib.c | ||
24 | +++ b/zebra/zebra_rib.c | ||
25 | @@ -765,6 +765,9 @@ rib_match_ipv6 (struct in6_addr *addr) | ||
26 | #define RIB_SYSTEM_ROUTE(R) \ | ||
27 | ((R)->type == ZEBRA_ROUTE_KERNEL || (R)->type == ZEBRA_ROUTE_CONNECT) | ||
28 | |||
29 | +#define RIB_KERNEL_ROUTE(R) \ | ||
30 | + ((R)->type == ZEBRA_ROUTE_KERNEL) | ||
31 | + | ||
32 | /* This function verifies reachability of one given nexthop, which can be | ||
33 | * numbered or unnumbered, IPv4 or IPv6. The result is unconditionally stored | ||
34 | * in nexthop->flags field. If the 4th parameter, 'set', is non-zero, | ||
35 | @@ -1135,6 +1138,10 @@ rib_process (struct route_node *rn) | ||
36 | redistribute_delete (&rn->p, fib); | ||
37 | if (! RIB_SYSTEM_ROUTE (fib)) | ||
38 | rib_uninstall_kernel (rn, fib); | ||
39 | +#ifdef GNU_LINUX | ||
40 | + else if(RIB_KERNEL_ROUTE (fib) && !if_is_up(if_lookup_by_index(fib->nexthop->ifindex))) | ||
41 | + del=fib; | ||
42 | +#endif | ||
43 | UNSET_FLAG (fib->flags, ZEBRA_FLAG_SELECTED); | ||
44 | |||
45 | /* Set real nexthop. */ | ||
46 | -- | ||
47 | 1.7.4.1 | ||
48 | |||
diff --git a/meta-networking/recipes-protocols/quagga/quagga.inc b/meta-networking/recipes-protocols/quagga/quagga.inc index 160c458cc..f9a32a99a 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)}" | |||
15 | LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \ | 15 | LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \ |
16 | file://COPYING.LIB;md5=f30a9716ef3762e3467a2f62bf790f0a" | 16 | file://COPYING.LIB;md5=f30a9716ef3762e3467a2f62bf790f0a" |
17 | 17 | ||
18 | INC_PR = "r1" | 18 | INC_PR = "r2" |
19 | 19 | ||
20 | QUAGGASUBDIR = "" | 20 | QUAGGASUBDIR = "" |
21 | # ${QUAGGASUBDIR} is deal with old versions. Set to "/attic" for old | 21 | # ${QUAGGASUBDIR} is deal with old versions. Set to "/attic" for old |
@@ -23,6 +23,7 @@ QUAGGASUBDIR = "" | |||
23 | SRC_URI = "http://download.savannah.gnu.org/releases/quagga${QUAGGASUBDIR}/quagga-${PV}.tar.gz;name=quagga-${PV} \ | 23 | SRC_URI = "http://download.savannah.gnu.org/releases/quagga${QUAGGASUBDIR}/quagga-${PV}.tar.gz;name=quagga-${PV} \ |
24 | file://fix-for-lib-inpath.patch \ | 24 | file://fix-for-lib-inpath.patch \ |
25 | file://quagga-0.99.17-libcap.patch \ | 25 | file://quagga-0.99.17-libcap.patch \ |
26 | file://Zebra-sync-zebra-routing-table-with-the-kernel-one.patch \ | ||
26 | file://quagga.init \ | 27 | file://quagga.init \ |
27 | file://quagga.default \ | 28 | file://quagga.default \ |
28 | file://watchquagga.init \ | 29 | file://watchquagga.init \ |