bug-zebra
[Top][All Lists]
Advanced

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

minor bugfix in ospfd/ospf_interface.c


From: Arnold, Gilad
Subject: minor bugfix in ospfd/ospf_interface.c
Date: Tue, 12 Mar 2002 11:07:05 +0200

Hi,

Launching ospfd with the following config file results in segfault:


!
! Zebra configuration saved from vty
!   2002/03/12 10:10:42
!
hostname venus-ospfd
password zebra
log file /usr/local/etc/ospfd.log
!
!
!
interface lo
!
interface eth0
 ip ospf transmit-delay 3
 ip ospf dead-interval 1800 10.13.163.161
 ip ospf priority 2 10.13.163.161
!
interface eth1
 ip ospf transmit-delay 3
!
router ospf
 ospf router-id 10.13.164.161
 network 10.13.161.0/24 area 0
 network 10.13.163.0/24 area 0
 network 10.13.164.0/24 area 0
!
line vty
 exec-timeout 0 0
!


Short tracing reveals that the problematic command is "ip ospf
dead-interval ...". The same behavior is accepted when you issue
this command (with the IP address argument) prior to any "router
ospf" command (that is, with no active ospf process). Apparently,
it is caused by NULL referencing in ospf_interface.c, as shown in 
the patch below.

Please verify my correction, I hope it doesn't screw-up any
semantics...

Zebra version: Today's CVS (2002-03-12)

Regards,
G.


---

Index: ospfd/ospf_interface.c
===================================================================
RCS file: /cvsroot/zebra/ospfd/ospf_interface.c,v
retrieving revision 1.133
diff -c -r1.133 ospf_interface.c
*** ospfd/ospf_interface.c      23 Jan 2002 22:25:16 -0000      1.133
--- ospfd/ospf_interface.c      11 Mar 2002 20:49:36 -0000
***************
*** 331,336 ****
--- 331,339 ----
    listnode node;
    struct ospf_interface *oi;
    
+   if (! ospf_top)
+     return NULL;
+ 
    for (node = listhead (ospf_top->oiflist); node; nextnode (node))
      if ((oi = getdata (node)) != NULL && oi->type !=
OSPF_IFTYPE_VIRTUALLINK)
        {



reply via email to

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