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

version 1.1.1.2, 2012/05/29 11:53:41 version 1.1.1.4, 2013/07/21 23:54:40
Line 300  ospf_packet_dup (struct ospf_packet *op) Line 300  ospf_packet_dup (struct ospf_packet *op)
 }  }
   
 /* XXX inline */  /* XXX inline */
static inline unsigned intstatic unsigned int
 ospf_packet_authspace (struct ospf_interface *oi)  ospf_packet_authspace (struct ospf_interface *oi)
 {  {
   int auth = 0;    int auth = 0;
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))
         {          {
          zlog_warn ("Link State Update: LSA checksum error %x, %x.",          /* (bug #685) more details in a one-line message make it possible
                     sum, lsah->checksum);           * to identify problem source on the one hand and to have a better
            * chance to compress repeated messages in syslog on the other */
           zlog_warn ("Link State Update: LSA checksum error %x/%x, ID=%s from: nbr %s, router ID %s, adv router %s",
                      sum, lsah->checksum, inet_ntoa (lsah->id),
                      inet_ntoa (nbr->src), inet_ntoa (nbr->router_id),
                      inet_ntoa (lsah->adv_router));
           continue;            continue;
         }          }
   
Line 1756  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 1780  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 1816  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 1885  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 1924  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)
Line 2140  ospf_recv_packet (int fd, struct interface **ifp, stru Line 2154  ospf_recv_packet (int fd, struct interface **ifp, stru
       
   ip_len = iph->ip_len;    ip_len = iph->ip_len;
       
#if !defined(GNU_LINUX) && (OpenBSD < 200311)#if !defined(GNU_LINUX) && (OpenBSD < 200311) && (__FreeBSD_version < 1000000)
   /*    /*
    * Kernel network code touches incoming IP header parameters,     * Kernel network code touches incoming IP header parameters,
    * before protocol specific processing.     * before protocol specific processing.
Line 2232  ospf_associate_packet_vl (struct ospf *ospf, struct in Line 2246  ospf_associate_packet_vl (struct ospf *ospf, struct in
   return NULL;    return NULL;
 }  }
   
static inline intstatic int
 ospf_check_area_id (struct ospf_interface *oi, struct ospf_header *ospfh)  ospf_check_area_id (struct ospf_interface *oi, struct ospf_header *ospfh)
 {  {
   /* Check match the Area ID of the receiving interface. */    /* Check match the Area ID of the receiving interface. */

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


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