Hi all.

Sorry for not clearly explain my issue in last email.
I recently encountered an issue when using ospf6d of quagga to test "interface 
down" scenario.
My test is simple and is shown in the following figure:


router id 1.1.1.1     eth cable              router id 2.2.2.2
My platform   <-------------------------->   a Cisco Router running OSPFv3
         eth0 2001::1                    G0/0 2001::2


I use my platform(router id is 1.1.1.1, eth0 address is 2001::1) to connect to 
a Cisco Router(router id is 2.2.2.2, G0/0 address is 2001::2) which is running 
OSPFv3. 
My platform is an embedded processor running ospf6d of quagga with an embedded 
OS and customized IPv6 protocol stack. 


My test procedure is as follows:
Step 1. I plug the Ethernet cable between the platform and Cisco Router. 
The routing table output by ospf6d of quagga on my platform is as follows:
N IA 2001::/64                  et0
The lsdb in area structure is as follows, there are 5 LSA: 1 router-LSA from 
the platform, 4 others from Cisco Router(The Cisco Router is DR):
LSDB in area:
Age:    2 Type: 0x2001Link State ID: 0.0.0.0nAdvertising Router: 1.1.1.1LS 
Sequence Number: 0x80000001CheckSum: 0xfb06 Length: 40
Age:   18 Type: 0x2001Link State ID: 0.0.0.0nAdvertising Router: 2.2.2.2LS 
Sequence Number: 0x80000005CheckSum: 0x8862 Length: 24
Age:    3 Type: NetworkLink State ID: 0.16.0.0nAdvertising Router: 2.2.2.2LS 
Sequence Number: 0x80000002CheckSum: 0xa75c Length: 32
Age:   17 Type: Intra-PrefixLink State ID: 0.0.0.1nAdvertising Router: 
2.2.2.2LS Sequence Number: 0x80000003CheckSum: 0x5ea0 Length: 44
Age:    2 Type: Intra-PrefixLink State ID: 0.0.0.2nAdvertising Router: 
2.2.2.2LS Sequence Number: 0x80000001CheckSum: 0xcc23 Length: 44
Step 2. I unplug the Ethernet cable between the platform and Cisco Router.
The routing table output by ospf6d of quagga on my platform is unchanged as in 
Step 1.
The lsdb in area structure is as follows, LSA generated by 1.1.1.1 is removed 
while LSA generated by 2.2.2.2 is still there.
LSDB in area:
Age:   71 Type: 0x2001Link State ID: 0.0.0.0nAdvertising Router: 2.2.2.2LS 
Sequence Number: 0x80000005CheckSum: 0x8862 Length: 40
Age:   66 Type: NetworkLink State ID: 0.16.0.0nAdvertising Router: 2.2.2.2LS 
Sequence Number: 0x80000002CheckSum: 0xa75c Length: 32
Age:   70 Type: Intra-PrefixLink State ID: 0.0.0.2nAdvertising Router: 
2.2.2.2LS Sequence Number: 0x80000001CheckSum: 0xcc23 Length: 44


I think the lsdb in area structure should not reserve the LSA from Cisco Router 
2.2.2.2 when the Ethernet cable is unplugged, since the neighbor is gone.


On my platform, the event of Ethernet cable unplugging can be captured by an 
Ethernet chip, then the application is informed by an interrupt. After that I 
call "ospf6_interface_state_update" as following:


ifp->flags &= ~IFF_UP;
ospf6_interface_state_update(ifp); 


Then, "ospf6_interface_state_update" will schedule a "interface_down" event.
In "interface_down" event, the following routine is executed:


  ospf6_interface_state_change (OSPF6_INTERFACE_DOWN, oi);


  for (ALL_LIST_ELEMENTS (oi->neighbor_list, node, nnode, on))
    ospf6_neighbor_delete (on);
  
  list_delete_all_node (oi->neighbor_list);
  
  (1)In "ospf6_interface_state_change", the following routine is executed:
  
   OSPF6_ROUTER_LSA_SCHEDULE (oi->area);
   if (next_state == OSPF6_INTERFACE_DOWN)
    {
      OSPF6_NETWORK_LSA_EXECUTE (oi);
      OSPF6_INTRA_PREFIX_LSA_EXECUTE_TRANSIT (oi);
      OSPF6_INTRA_PREFIX_LSA_SCHEDULE_STUB (oi->area);
    }
Schedule a router-LSA. 
Execute a network-LSA (my platform is not DR, so this LSA will not be 
generated).
Execute a intra-prefix-LSA_transit (my platform is not DR, so this LSA will not 
be generated).
Schedule a intra-prefix-LSA_stub (since no neighbor is full, this LSA will not 
be generated).
   (2)In "ospf6_neighbor_delete", all lsdb structure in ospf6_neighbor 
structure will be cleared and ospf6_neighbor structure will be freed.
   
   However, none of the above procedure remove the LSA received from neighbor 
in ospf6_area structure which I think should be removed when the Ethernet cable 
is unplugged and the neighbor is gone.


   What should be done to remove the LSA received from neighbor in ospf6_area 
structure? Is there anything I missed?
   
   Thanks in advance!
   
   Danny

_______________________________________________
Quagga-users mailing list
Quagga-users@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-users

Reply via email to