Mailing List Archive

ripd bug
Hi,

I'm seeing some strange behavior from ripd.

Here are the symptoms:
When I start it up with the simple conf file shown below:

hostname ripd
password zebra
log stdout
!
debug rip events
debug rip packet
debug rip zebra
!
interface hme0
ip rip send version 1
ip rip receive version 1
!
interface lo0
!
router rip
redistribute connected
network hme0
!
line vty


and a rip packet is received on hme0, the debug log tells me:
" RIP: RIP is not enabled on interface hme0."
Tracing through gdb shows that rip_read finds that ri->running is not set.

More interestingly, when I telnet to rip-port and, via the vty, set
'no network hme0', ripd suddenly goes off and enables ripd on hme0.

Here's the analysis:

I think there are many things broken here. When I tried debugging
the problem with gdb, I found the following sequence happens on startup:

1. rip_interface_read gets the message from zebra about hme0
It adds the interface, but cannot do a rip_enable_apply() because
it has not yet received info about connected addresses.

2. rip_interface_address_add gets info about connected address. In Rev 1.4*
and earlier versions, it would call rip_enable_apply() and enable the
interface, but somehow, rip_apply_address_add() (added in Rev 1.5)
misses this step.

I don't know what else is impacted by the addition of
rip_apply_address_add. At the very least, rip_interface_address_add()
should continue to call rip_enable_apply() before calling
rip_apply_address_add(). Comments?

--Sowmini