Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Quagga: Dev
[PATCH] Zebra rib/fib to be in sinc with kernel routing table
 

Index | Next | Previous | View Flat


igorm at etf

Oct 20, 2011, 5:36 AM


Views: 565
Permalink
[PATCH] Zebra rib/fib to be in sinc with kernel routing table

From: Igor Maravic <igorm [at] etf>

Enable Zebra rib/fib to be in sinc with kernel routing table. That means
when interface goes down, all routes that are directly connected to it are
deleted from Zebra's rib/fib just like they are delete from kernel
routing table.

Signed-off-by: Igor Maravic <igorm [at] etf>
---
:100644 100644 12f3fa5... 8fcefa4... M zebra/zebra_rib.c
zebra/zebra_rib.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 12f3fa5..8fcefa4 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -758,6 +758,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,
@@ -1127,7 +1130,9 @@ rib_process (struct route_node *rn)
buf, rn->p.prefixlen, fib);
redistribute_delete (&rn->p, fib);
if (! RIB_SYSTEM_ROUTE (fib))
- rib_uninstall_kernel (rn, fib);
+ rib_uninstall_kernel (rn, fib);
+ else if(RIB_KERNEL_ROUTE (fib))
+ del=fib;
UNSET_FLAG (fib->flags, ZEBRA_FLAG_SELECTED);

/* Set real nexthop. */
--
1.7.4.1

_______________________________________________
Quagga-dev mailing list
Quagga-dev [at] lists
http://lists.quagga.net/mailman/listinfo/quagga-dev

Subject User Time
[PATCH] Zebra rib/fib to be in sinc with kernel routing table igorm at etf Oct 20, 2011, 5:36 AM
    Re: [PATCH] Zebra rib/fib to be in sinc with kernel routing table joakim.tjernlund at transmode Oct 20, 2011, 7:37 AM
    Re: [PATCH] Zebra rib/fib to be in sinc with kernel routing table igorm at etf Oct 20, 2011, 7:40 AM
    Re: [PATCH] Zebra rib/fib to be in sinc with kernel routing table joakim.tjernlund at transmode Oct 20, 2011, 8:17 AM
    Re: [PATCH] Zebra rib/fib to be in sinc with kernel routing table shemminger at vyatta Oct 20, 2011, 8:31 AM
    Re: [PATCH] Zebra rib/fib to be in sinc with kernel routing table lsorense at csclub Oct 20, 2011, 8:34 AM
    Re: [PATCH] Zebra rib/fib to be in sinc with kernel routing table carlsonj at workingcode Oct 20, 2011, 9:09 AM
        Re: [PATCH] Zebra rib/fib to be in sinc with kernel routing table lsorense at csclub Oct 20, 2011, 9:34 AM
    Re: [PATCH] Zebra rib/fib to be in sinc with kernel routing table lsorense at csclub Oct 20, 2011, 9:37 AM
    Re: [PATCH] Zebra rib/fib to be in sinc with kernel routing table igorm at etf Oct 21, 2011, 5:05 AM
    Re: [PATCH] Zebra rib/fib to be in sinc with kernel routing table joakim.tjernlund at transmode Oct 21, 2011, 6:36 AM
    Re: [PATCH] Zebra rib/fib to be in sinc with kernel routing table igorm at etf Oct 23, 2011, 5:36 AM
    Re: [PATCH] Zebra rib/fib to be in sinc with kernel routing table lsorense at csclub Oct 24, 2011, 7:20 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.