Diff for /embedaddon/quagga/ospfd/ospf_packet.c between versions 1.1.1.3 and 1.1.1.4

version 1.1.1.3, 2012/10/09 09:22:29 version 1.1.1.4, 2013/07/21 23:54:40
Line 1590  ospf_ls_upd_list_lsa (struct ospf_neighbor *nbr, struc Line 1590  ospf_ls_upd_list_lsa (struct ospf_neighbor *nbr, struc
   
       /* Validate the LSA's LS checksum. */        /* Validate the LSA's LS checksum. */
       sum = lsah->checksum;        sum = lsah->checksum;
      if (sum != ospf_lsa_checksum (lsah))      if (! ospf_lsa_checksum_valid (lsah))
         {          {
           /* (bug #685) more details in a one-line message make it possible            /* (bug #685) more details in a one-line message make it possible
            * to identify problem source on the one hand and to have a better             * to identify problem source on the one hand and to have a better
Line 1761  ospf_ls_upd (struct ip *iph, struct ospf_header *ospfh Line 1761  ospf_ls_upd (struct ip *iph, struct ospf_header *ospfh
         ospf_lsa_discard (L); \          ospf_lsa_discard (L); \
         continue; }          continue; }
   
  /* Process each LSA received in the one packet. */  /* Process each LSA received in the one packet.
    *
    * Numbers in parentheses, e.g. (1), (2), etc., and the corresponding
    * text below are from the steps in RFC 2328, Section 13.
    */
   for (ALL_LIST_ELEMENTS (lsas, node, nnode, lsa))    for (ALL_LIST_ELEMENTS (lsas, node, nnode, lsa))
     {      {
       struct ospf_lsa *ls_ret, *current;        struct ospf_lsa *ls_ret, *current;
Line 1785  ospf_ls_upd (struct ip *iph, struct ospf_header *ospfh Line 1789  ospf_ls_upd (struct ip *iph, struct ospf_header *ospfh
   
       listnode_delete (lsas, lsa); /* We don't need it in list anymore */        listnode_delete (lsas, lsa); /* We don't need it in list anymore */
   
      /* Validate Checksum - Done above by ospf_ls_upd_list_lsa() */      /* (1) Validate Checksum - Done above by ospf_ls_upd_list_lsa() */
   
      /* LSA Type  - Done above by ospf_ls_upd_list_lsa() */      /* (2) LSA Type  - Done above by ospf_ls_upd_list_lsa() */
         
      /* Do not take in AS External LSAs if we are a stub or NSSA. */      /* (3) Do not take in AS External LSAs if we are a stub or NSSA. */
   
       /* Do not take in AS NSSA if this neighbor and we are not NSSA */        /* Do not take in AS NSSA if this neighbor and we are not NSSA */
   
Line 1821  ospf_ls_upd (struct ip *iph, struct ospf_header *ospfh Line 1825  ospf_ls_upd (struct ip *iph, struct ospf_header *ospfh
   
       current = ospf_lsa_lookup_by_header (oi->area, lsa->data);        current = ospf_lsa_lookup_by_header (oi->area, lsa->data);
   
      /* If the LSA's LS age is equal to MaxAge, and there is currently      /* (4) If the LSA's LS age is equal to MaxAge, and there is currently
          no instance of the LSA in the router's link state database,           no instance of the LSA in the router's link state database,
          and none of router's neighbors are in states Exchange or Loading,           and none of router's neighbors are in states Exchange or Loading,
         then take the following actions. */         then take the following actions: */
   
       if (IS_LSA_MAXAGE (lsa) && !current &&        if (IS_LSA_MAXAGE (lsa) && !current &&
           (ospf_nbr_count (oi, NSM_Exchange) +            (ospf_nbr_count (oi, NSM_Exchange) +
            ospf_nbr_count (oi, NSM_Loading)) == 0)             ospf_nbr_count (oi, NSM_Loading)) == 0)
         {          {
          /* Response Link State Acknowledgment. */          /* (4a) Response Link State Acknowledgment. */
           ospf_ls_ack_send (nbr, lsa);            ospf_ls_ack_send (nbr, lsa);
   
          /* Discard LSA. */                    /* (4b) Discard LSA. */
          zlog_info ("Link State Update[%s]: LS age is equal to MaxAge.",          if (IS_DEBUG_OSPF (lsa, LSA))
                     dump_lsa_key(lsa));            {
                zlog_debug ("Link State Update[%s]: LS age is equal to MaxAge.",
                            dump_lsa_key(lsa));
             }
           DISCARD_LSA (lsa, 3);            DISCARD_LSA (lsa, 3);
         }          }
   
Line 1890  ospf_ls_upd (struct ip *iph, struct ospf_header *ospfh Line 1897  ospf_ls_upd (struct ip *iph, struct ospf_header *ospfh
 #endif /* HAVE_OPAQUE_LSA */  #endif /* HAVE_OPAQUE_LSA */
   
       /* It might be happen that received LSA is self-originated network LSA, but        /* It might be happen that received LSA is self-originated network LSA, but
       * router ID is cahnged. So, we should check if LSA is a network-LSA whose       * router ID is changed. So, we should check if LSA is a network-LSA whose
        * Link State ID is one of the router's own IP interface addresses but whose         * Link State ID is one of the router's own IP interface addresses but whose
        * Advertising Router is not equal to the router's own Router ID         * Advertising Router is not equal to the router's own Router ID
        * According to RFC 2328 12.4.2 and 13.4 this LSA should be flushed.         * According to RFC 2328 12.4.2 and 13.4 this LSA should be flushed.
Line 1929  ospf_ls_upd (struct ip *iph, struct ospf_header *ospfh Line 1936  ospf_ls_upd (struct ip *iph, struct ospf_header *ospfh
       /* (5) Find the instance of this LSA that is currently contained        /* (5) Find the instance of this LSA that is currently contained
          in the router's link state database.  If there is no           in the router's link state database.  If there is no
          database copy, or the received LSA is more recent than           database copy, or the received LSA is more recent than
         the database copy the following steps must be performed. */         the database copy the following steps must be performed.
          (The sub steps from RFC 2328 section 13 step (5) will be performed in
          ospf_flood() ) */
   
       if (current == NULL ||        if (current == NULL ||
           (ret = ospf_lsa_more_recent (current, lsa)) < 0)            (ret = ospf_lsa_more_recent (current, lsa)) < 0)

Removed from v.1.1.1.3  
changed lines
  Added in v.1.1.1.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>