MERAprojects / ops-quagga

GNU General Public License v2.0
0 stars 0 forks source link

OSPF LSA age always is 3600 #22

Open xivamar opened 8 years ago

xivamar commented 8 years ago

Problem Description:

OSPF LSA age always is 3600. And it seems that the old LSA are not deleted from the ospf database.

OpenSwitch version:

OpenSwitch 1.0.0 (Build: appliance-ops-1.0.0-release+2016090200)

Test Topology:

ospf_topology

Steps to reproduce the problem:

  1. Configure DUTs as in attached file.
  2. Check the ospf database via show ip ospf database on DUT2.

    on DUT2:

     switch# show ip ospf database 
    
            OSPF Router 
    
                     Router Link States (Area 0.0.0.0)
    
     Link ID         ADV Router      Age       Seq#       CkSum      Link count
     192.168.3.1     192.168.3.1     3600      0x8000008c 0x00001c45 0
     192.168.1.1     192.168.1.1               0x80000001 0x0000e7ca 0
     192.168.1.1     192.168.1.1               0x8000000a 0x00002cbc 0
     192.168.2.1     192.168.2.1     3600      0x8000008d 0x00001e45 0
     192.168.2.1     192.168.2.1     3600      0x80000011 0x000017c8 0
     192.168.2.1     192.168.2.1     3600      0x8000001d 0x0000fed4 0
     192.168.1.1     192.168.1.1               0x80000033 0x0000d9e5 0
    
                     Net Link States (Area 0.0.0.0)
    
     Link ID         ADV Router      Age       Seq#       CkSum
     172.16.1.3      192.168.3.1     3600      0x80000089 0x0000b3a6
     172.16.1.3      192.168.3.1     3600      0x80000001 0x0000b79a
     172.16.1.3      192.168.3.1     3600      0x8000000c 0x0000ae29
     172.16.1.3      192.168.3.1     3600      0x8000000f 0x0000a82c
     172.16.1.3      192.168.3.1     3600      0x80000015 0x00009c32
     172.16.1.3      192.168.3.1     3600      0x8000003d 0x00004c5a
     switch# 

config.txt

mfirulin commented 7 years ago

Pull request: https://github.com/MERAprojects/ops-quagga/pull/37

xivamar commented 7 years ago

The 1st part is fixed on:

switch# show version 
OpenSwitch 0.4.0 (Build: appliance-ops-0.4.0-meraswitch/devel/master-20170110110121-dev)
switch#
mfirulin commented 7 years ago

The function ospf_lsa_maxage_walker is scheduled by the timer OSPF_LSA_MAXAGE_CHECK_INTERVAL (30 sec). Then it invokes ospf_lsa_maxage_walker_remover. Inside the last one the condition "if (IS_LSA_MAXAGE (lsa))" never gets true, because the function get_age inside the macro IS_LSA_MAXAGE always returns values less OSPF_LSA_MAXAGE, while the command show ip ospf database shows LSAs with age 3600. This should be investigated further.

Also the delivered correction for correct printing LSA age should be updated: remove: lsa_age = lsa->data->ls_age; add instead: lsa_age = get_age(lsa);

mfirulin commented 7 years ago

The difference of the variable relative_time and the field tv_recv of LSAs never exceeds about 1800 seconds, so the function get_age never returns bigger value. It is still unclear if tv_recv is updated during live of LSA, or LSAs are silently deleted and new ones created with small values of the tv_recv.