bug-zebra
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

zebra routetable bug (1)


From: Rumen Svobodnikov
Subject: zebra routetable bug (1)
Date: Sun, 28 Oct 2001 18:29:25 +0200 (EET)

1. Problem description

Zebra does not recognize connected routes when there is routing table
configured in zebra.conf.
The problem is that when interface_list() is called the connected routes
are inserted in rib with routing table 0, and later when rib_weed_tables()
is called, the connected routes are removed.

Here is example of zebra.conf which does not use the table command:

!
! Zebra configuration saved from vty
!   2001/10/28 18:02:43
!
hostname access
password 8 ....
enable password 8 ....
service password-encryption
!
interface lo
!
interface eth0
!
interface ppp3
!
interface ppp11
!
interface ppp8
!
interface ppp10
!
interface ppp7
!
interface ppp9
!
interface ppp0
!
interface ppp1
!
interface ppp5
!
interface ppp4
!
interface ppp6
!
interface ppp2
!
line vty
!

Here is how "show ip route" looks with this config:
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
       B - BGP, > - selected route, * - FIB route

K * 127.0.0.0/8 is directly connected, lo
C>* 127.0.0.0/8 is directly connected, lo
C>* 193.200.17.0/28 is directly connected, eth0
C>* 217.79.78.240/32 is directly connected, ppp3
C>* 217.79.78.242/32 is directly connected, ppp1
C>* 217.79.78.243/32 is directly connected, ppp0
C>* 217.79.78.244/32 is directly connected, ppp6
C>* 217.79.78.245/32 is directly connected, ppp2
C>* 217.79.78.246/32 is directly connected, ppp4
C>* 217.79.78.247/32 is directly connected, ppp8
C>* 217.79.78.248/32 is directly connected, ppp5
C>* 217.79.78.249/32 is directly connected, ppp9
C>* 217.79.78.251/32 is directly connected, ppp7
C>* 217.79.79.0/28 is directly connected, eth0
C>* 217.79.79.217/32 is directly connected, eth0


Now if in this config we add one line "table 250", here is the output
of "show ip route":
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
       B - BGP, > - selected route, * - FIB route

K * 127.0.0.0/8 is directly connected, lo


As you see zebra does not anymore recognize the connected routes.

2. Zebra version
this is zebra 0.92a from CVS, checked Sun Oct 28 18:15:58 EET 2001
Linux access 2.2.19 #3 Tue Sep 11 16:53:05 EEST 2001 i586 unknown
zebra compiled with:
./configure --disable-ipv6 --disable-ripd --disable-ripngd --disable-ospfd
--disable-ospf6d --enable-netlink

3. Possible fix
I think the problem is in connected.c, line 85
  rib_add_ipv4 (ZEBRA_ROUTE_CONNECT, 0, &p, NULL, ifp->ifindex, 0, 0, 0);

Here the route is added with table 0, and is later removed by
rib_weed_tables()
The proposed fix is:
  rib_add_ipv4 (ZEBRA_ROUTE_CONNECT, 0, &p, NULL, ifp->ifindex, RT_TABLE_MAIN,
0, 0);

  I don't know if RT_TABLE_MAIN is the best choise here, but linux kernel
always inserts connected routes in table main, that is why i prefered 
RT_TABLE_MAIN and not rtm_table_default. And these rotes are not inserted
in kernel fib anyway, they are only inserted in zebra rib (and considered
when making nexthop reachability decision).
  Attached is a patch that should fix this particular problem (as i said i am
not sure this is the correct fix)

best regards,
Rumen Svobodnikov,
System Administrator,
Technical University of Varna, Bulgaria

Attachment: connected.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]