Diff for /embedaddon/quagga/ospf6d/ospf6_message.c between versions 1.1.1.1 and 1.1.1.2

version 1.1.1.1, 2012/02/21 17:26:12 version 1.1.1.2, 2012/10/09 09:22:28
Line 47 Line 47
 #include "ospf6_flood.h"  #include "ospf6_flood.h"
 #include "ospf6d.h"  #include "ospf6d.h"
   
   #include <netinet/ip6.h>
   
 unsigned char conf_debug_ospf6_message[6] = {0x03, 0, 0, 0, 0, 0};  unsigned char conf_debug_ospf6_message[6] = {0x03, 0, 0, 0, 0, 0};
const char *ospf6_message_type_str[] =static const struct message ospf6_message_type_str [] =
  { "Unknown", "Hello", "DbDesc", "LSReq", "LSUpdate", "LSAck" };{
   { OSPF6_MESSAGE_TYPE_HELLO,    "Hello"    },
   { OSPF6_MESSAGE_TYPE_DBDESC,   "DbDesc"   },
   { OSPF6_MESSAGE_TYPE_LSREQ,    "LSReq"    },
   { OSPF6_MESSAGE_TYPE_LSUPDATE, "LSUpdate" },
   { OSPF6_MESSAGE_TYPE_LSACK,    "LSAck"    },
 };
 static const size_t ospf6_message_type_str_max =
   sizeof (ospf6_message_type_str) / sizeof (ospf6_message_type_str[0]);
   
 /* Minimum (besides the standard OSPF packet header) lengths for OSPF  /* Minimum (besides the standard OSPF packet header) lengths for OSPF
    packets of particular types, offset is the "type" field. */     packets of particular types, offset is the "type" field. */
Line 126  ospf6_hello_print (struct ospf6_header *oh) Line 136  ospf6_hello_print (struct ospf6_header *oh)
       zlog_debug ("    Neighbor: %s", neighbor);        zlog_debug ("    Neighbor: %s", neighbor);
     }      }
   
  if (p != OSPF6_MESSAGE_END (oh))  assert (p == OSPF6_MESSAGE_END (oh));
    zlog_debug ("Trailing garbage exists"); 
 }  }
   
 void  void
Line 159  ospf6_dbdesc_print (struct ospf6_header *oh) Line 168  ospf6_dbdesc_print (struct ospf6_header *oh)
        p += sizeof (struct ospf6_lsa_header))         p += sizeof (struct ospf6_lsa_header))
     ospf6_lsa_header_print_raw ((struct ospf6_lsa_header *) p);      ospf6_lsa_header_print_raw ((struct ospf6_lsa_header *) p);
   
  if (p != OSPF6_MESSAGE_END (oh))  assert (p == OSPF6_MESSAGE_END (oh));
    zlog_debug ("Trailing garbage exists"); 
 }  }
   
 void  void
Line 183  ospf6_lsreq_print (struct ospf6_header *oh) Line 191  ospf6_lsreq_print (struct ospf6_header *oh)
                  ospf6_lstype_name (e->type), id, adv_router);                   ospf6_lstype_name (e->type), id, adv_router);
     }      }
   
  if (p != OSPF6_MESSAGE_END (oh))  assert (p == OSPF6_MESSAGE_END (oh));
    zlog_debug ("Trailing garbage exists"); 
 }  }
   
 void  void
Line 209  ospf6_lsupdate_print (struct ospf6_header *oh) Line 216  ospf6_lsupdate_print (struct ospf6_header *oh)
        p += OSPF6_LSA_SIZE (p))         p += OSPF6_LSA_SIZE (p))
     {      {
       ospf6_lsa_header_print_raw ((struct ospf6_lsa_header *) p);        ospf6_lsa_header_print_raw ((struct ospf6_lsa_header *) p);
       if (OSPF6_LSA_SIZE (p) < sizeof (struct ospf6_lsa_header))  
         {  
           zlog_debug ("    Malformed LSA length, quit printing");  
           break;  
         }  
     }      }
   
  if (p != OSPF6_MESSAGE_END (oh))  assert (p == OSPF6_MESSAGE_END (oh));
    { 
      char buf[32]; 
 
      int num = 0; 
      memset (buf, 0, sizeof (buf)); 
 
      zlog_debug ("    Trailing garbage exists"); 
      while (p < OSPF6_MESSAGE_END (oh)) 
        { 
          snprintf (buf, sizeof (buf), "%s %2x", buf, *p++); 
          num++; 
          if (num == 8) 
            { 
              zlog_debug ("    %s", buf); 
              memset (buf, 0, sizeof (buf)); 
              num = 0; 
            } 
        } 
      if (num) 
        zlog_debug ("    %s", buf); 
    } 
 }  }
   
 void  void
Line 253  ospf6_lsack_print (struct ospf6_header *oh) Line 234  ospf6_lsack_print (struct ospf6_header *oh)
        p += sizeof (struct ospf6_lsa_header))         p += sizeof (struct ospf6_lsa_header))
     ospf6_lsa_header_print_raw ((struct ospf6_lsa_header *) p);      ospf6_lsa_header_print_raw ((struct ospf6_lsa_header *) p);
   
  if (p != OSPF6_MESSAGE_END (oh))  assert (p == OSPF6_MESSAGE_END (oh));
    zlog_debug ("Trailing garbage exists"); 
 }  }
   
 static void  static void
Line 321  ospf6_hello_recv (struct in6_addr *src, struct in6_add Line 301  ospf6_hello_recv (struct in6_addr *src, struct in6_add
         twoway++;          twoway++;
     }      }
   
  if (p != OSPF6_MESSAGE_END (oh))  assert (p == OSPF6_MESSAGE_END (oh));
    { 
      if (IS_OSPF6_DEBUG_MESSAGE (oh->type, RECV)) 
        zlog_debug ("Trailing garbage ignored"); 
    } 
   
   /* RouterPriority check */    /* RouterPriority check */
   if (on->priority != hello->priority)    if (on->priority != hello->priority)
Line 558  ospf6_dbdesc_recv_master (struct ospf6_header *oh, Line 534  ospf6_dbdesc_recv_master (struct ospf6_header *oh,
         }          }
     }      }
   
  if (p != OSPF6_MESSAGE_END (oh))  assert (p == OSPF6_MESSAGE_END (oh));
    { 
      if (IS_OSPF6_DEBUG_MESSAGE (oh->type, RECV)) 
        zlog_debug ("Trailing garbage ignored"); 
    } 
   
   /* Increment sequence number */    /* Increment sequence number */
   on->dbdesc_seqnum ++;    on->dbdesc_seqnum ++;
Line 770  ospf6_dbdesc_recv_slave (struct ospf6_header *oh, Line 742  ospf6_dbdesc_recv_slave (struct ospf6_header *oh,
         ospf6_lsa_delete (his);          ospf6_lsa_delete (his);
     }      }
   
  if (p != OSPF6_MESSAGE_END (oh))  assert (p == OSPF6_MESSAGE_END (oh));
    { 
      if (IS_OSPF6_DEBUG_MESSAGE (oh->type, RECV)) 
        zlog_debug ("Trailing garbage ignored"); 
    } 
   
   /* Set sequence number to Master's */    /* Set sequence number to Master's */
   on->dbdesc_seqnum = ntohl (dbdesc->seqnum);    on->dbdesc_seqnum = ntohl (dbdesc->seqnum);
Line 910  ospf6_lsreq_recv (struct in6_addr *src, struct in6_add Line 878  ospf6_lsreq_recv (struct in6_addr *src, struct in6_add
       ospf6_lsdb_add (ospf6_lsa_copy (lsa), on->lsupdate_list);        ospf6_lsdb_add (ospf6_lsa_copy (lsa), on->lsupdate_list);
     }      }
   
  if (p != OSPF6_MESSAGE_END (oh))  assert (p == OSPF6_MESSAGE_END (oh));
    { 
      if (IS_OSPF6_DEBUG_MESSAGE (oh->type, RECV)) 
        zlog_debug ("Trailing garbage ignored"); 
    } 
   
   /* schedule send lsupdate */    /* schedule send lsupdate */
   THREAD_OFF (on->thread_send_lsupdate);    THREAD_OFF (on->thread_send_lsupdate);
Line 1140  ospf6_lsaseq_examin Line 1104  ospf6_lsaseq_examin
     if (length < OSPF6_LSA_HEADER_SIZE)      if (length < OSPF6_LSA_HEADER_SIZE)
     {      {
       if (IS_OSPF6_DEBUG_MESSAGE (OSPF6_MESSAGE_TYPE_UNKNOWN, RECV))        if (IS_OSPF6_DEBUG_MESSAGE (OSPF6_MESSAGE_TYPE_UNKNOWN, RECV))
        zlog_debug ("%s: undersized (%u B) trailing (#%u) LSA header",        zlog_debug ("%s: undersized (%zu B) trailing (#%u) LSA header",
                     __func__, length, counted_lsas);                      __func__, length, counted_lsas);
       return MSG_NG;        return MSG_NG;
     }      }
Line 1172  ospf6_lsaseq_examin Line 1136  ospf6_lsaseq_examin
       if (lsalen > length)        if (lsalen > length)
       {        {
         if (IS_OSPF6_DEBUG_MESSAGE (OSPF6_MESSAGE_TYPE_UNKNOWN, RECV))          if (IS_OSPF6_DEBUG_MESSAGE (OSPF6_MESSAGE_TYPE_UNKNOWN, RECV))
          zlog_debug ("%s: anomaly in %s LSA #%u: declared length is %u B, buffered length is %u B",          zlog_debug ("%s: anomaly in %s LSA #%u: declared length is %u B, buffered length is %zu B",
                       __func__, ospf6_lstype_name (lsah->type), counted_lsas, lsalen, length);                        __func__, ospf6_lstype_name (lsah->type), counted_lsas, lsalen, length);
         return MSG_NG;          return MSG_NG;
       }        }
Line 1238  ospf6_packet_examin (struct ospf6_header *oh, const un Line 1202  ospf6_packet_examin (struct ospf6_header *oh, const un
   {    {
     if (IS_OSPF6_DEBUG_MESSAGE (OSPF6_MESSAGE_TYPE_UNKNOWN, RECV))      if (IS_OSPF6_DEBUG_MESSAGE (OSPF6_MESSAGE_TYPE_UNKNOWN, RECV))
       zlog_debug ("%s: undersized (%u B) %s packet", __func__,        zlog_debug ("%s: undersized (%u B) %s packet", __func__,
                  bytesonwire, ospf6_message_type_str[oh->type]);                  bytesonwire, LOOKUP (ospf6_message_type_str, oh->type));
     return MSG_NG;      return MSG_NG;
   }    }
   /* type-specific deeper validation */    /* type-specific deeper validation */
Line 1251  ospf6_packet_examin (struct ospf6_header *oh, const un Line 1215  ospf6_packet_examin (struct ospf6_header *oh, const un
       return MSG_OK;        return MSG_OK;
     if (IS_OSPF6_DEBUG_MESSAGE (OSPF6_MESSAGE_TYPE_UNKNOWN, RECV))      if (IS_OSPF6_DEBUG_MESSAGE (OSPF6_MESSAGE_TYPE_UNKNOWN, RECV))
       zlog_debug ("%s: alignment error in %s packet",        zlog_debug ("%s: alignment error in %s packet",
                  __func__, ospf6_message_type_str[oh->type]);                  __func__, LOOKUP (ospf6_message_type_str, oh->type));
     return MSG_NG;      return MSG_NG;
   case OSPF6_MESSAGE_TYPE_DBDESC:    case OSPF6_MESSAGE_TYPE_DBDESC:
     /* RFC5340 A.3.3, packet header + OSPF6_DB_DESC_MIN_SIZE bytes followed      /* RFC5340 A.3.3, packet header + OSPF6_DB_DESC_MIN_SIZE bytes followed
Line 1270  ospf6_packet_examin (struct ospf6_header *oh, const un Line 1234  ospf6_packet_examin (struct ospf6_header *oh, const un
       return MSG_OK;        return MSG_OK;
     if (IS_OSPF6_DEBUG_MESSAGE (OSPF6_MESSAGE_TYPE_UNKNOWN, RECV))      if (IS_OSPF6_DEBUG_MESSAGE (OSPF6_MESSAGE_TYPE_UNKNOWN, RECV))
       zlog_debug ("%s: alignment error in %s packet",        zlog_debug ("%s: alignment error in %s packet",
                  __func__, ospf6_message_type_str[oh->type]);                  __func__, LOOKUP (ospf6_message_type_str, oh->type));
     return MSG_NG;      return MSG_NG;
   case OSPF6_MESSAGE_TYPE_LSUPDATE:    case OSPF6_MESSAGE_TYPE_LSUPDATE:
     /* RFC5340 A.3.5, packet header + OSPF6_LS_UPD_MIN_SIZE bytes followed      /* RFC5340 A.3.5, packet header + OSPF6_LS_UPD_MIN_SIZE bytes followed
Line 1300  ospf6_packet_examin (struct ospf6_header *oh, const un Line 1264  ospf6_packet_examin (struct ospf6_header *oh, const un
     return MSG_NG;      return MSG_NG;
   }    }
   if (test != MSG_OK && IS_OSPF6_DEBUG_MESSAGE (OSPF6_MESSAGE_TYPE_UNKNOWN, RECV))    if (test != MSG_OK && IS_OSPF6_DEBUG_MESSAGE (OSPF6_MESSAGE_TYPE_UNKNOWN, RECV))
    zlog_debug ("%s: anomaly in %s packet", __func__, ospf6_message_type_str[oh->type]);    zlog_debug ("%s: anomaly in %s packet", __func__, LOOKUP (ospf6_message_type_str, oh->type));
   return test;    return test;
 }  }
   
Line 1355  ospf6_lsupdate_recv (struct in6_addr *src, struct in6_ Line 1319  ospf6_lsupdate_recv (struct in6_addr *src, struct in6_
 {  {
   struct ospf6_neighbor *on;    struct ospf6_neighbor *on;
   struct ospf6_lsupdate *lsupdate;    struct ospf6_lsupdate *lsupdate;
   unsigned long num;  
   char *p;    char *p;
   
   on = ospf6_neighbor_lookup (oh->router_id, oi);    on = ospf6_neighbor_lookup (oh->router_id, oi);
Line 1378  ospf6_lsupdate_recv (struct in6_addr *src, struct in6_ Line 1341  ospf6_lsupdate_recv (struct in6_addr *src, struct in6_
   lsupdate = (struct ospf6_lsupdate *)    lsupdate = (struct ospf6_lsupdate *)
     ((caddr_t) oh + sizeof (struct ospf6_header));      ((caddr_t) oh + sizeof (struct ospf6_header));
   
   num = ntohl (lsupdate->lsa_number);  
   
   /* Process LSAs */    /* Process LSAs */
   for (p = (char *) ((caddr_t) lsupdate + sizeof (struct ospf6_lsupdate));    for (p = (char *) ((caddr_t) lsupdate + sizeof (struct ospf6_lsupdate));
        p < OSPF6_MESSAGE_END (oh) &&         p < OSPF6_MESSAGE_END (oh) &&
        p + OSPF6_LSA_SIZE (p) <= OSPF6_MESSAGE_END (oh);         p + OSPF6_LSA_SIZE (p) <= OSPF6_MESSAGE_END (oh);
        p += OSPF6_LSA_SIZE (p))         p += OSPF6_LSA_SIZE (p))
     {      {
       if (num == 0)  
         break;  
       if (OSPF6_LSA_SIZE (p) < sizeof (struct ospf6_lsa_header))  
         {  
           if (IS_OSPF6_DEBUG_MESSAGE (oh->type, RECV))  
             zlog_debug ("Malformed LSA length, quit processing");  
           break;  
         }  
   
       ospf6_receive_lsa (on, (struct ospf6_lsa_header *) p);        ospf6_receive_lsa (on, (struct ospf6_lsa_header *) p);
       num--;  
     }      }
   
  if (num != 0)  assert (p == OSPF6_MESSAGE_END (oh));
    { 
      if (IS_OSPF6_DEBUG_MESSAGE (oh->type, RECV)) 
        zlog_debug ("Malformed LSA number or LSA length"); 
    } 
  if (p != OSPF6_MESSAGE_END (oh)) 
    { 
      if (IS_OSPF6_DEBUG_MESSAGE (oh->type, RECV)) 
        zlog_debug ("Trailing garbage ignored"); 
    } 
   
   /* RFC2328 Section 10.9: When the neighbor responds to these requests    /* RFC2328 Section 10.9: When the neighbor responds to these requests
      with the proper Link State Update packet(s), the Link state request       with the proper Link State Update packet(s), the Link state request
Line 1524  ospf6_lsack_recv (struct in6_addr *src, struct in6_add Line 1466  ospf6_lsack_recv (struct in6_addr *src, struct in6_add
       ospf6_lsa_delete (his);        ospf6_lsa_delete (his);
     }      }
   
  if (p != OSPF6_MESSAGE_END (oh))  assert (p == OSPF6_MESSAGE_END (oh));
    { 
      if (IS_OSPF6_DEBUG_MESSAGE (oh->type, RECV)) 
        zlog_debug ("Trailing garbage ignored"); 
    } 
 }  }
   
 static u_char *recvbuf = NULL;  static u_char *recvbuf = NULL;
Line 1647  ospf6_receive (struct thread *thread) Line 1585  ospf6_receive (struct thread *thread)
       inet_ntop (AF_INET6, &src, srcname, sizeof (srcname));        inet_ntop (AF_INET6, &src, srcname, sizeof (srcname));
       inet_ntop (AF_INET6, &dst, dstname, sizeof (dstname));        inet_ntop (AF_INET6, &dst, dstname, sizeof (dstname));
       zlog_debug ("%s received on %s",        zlog_debug ("%s received on %s",
                 OSPF6_MESSAGE_TYPE_NAME (oh->type), oi->interface->name);                 LOOKUP (ospf6_message_type_str, oh->type), oi->interface->name);
       zlog_debug ("    src: %s", srcname);        zlog_debug ("    src: %s", srcname);
       zlog_debug ("    dst: %s", dstname);        zlog_debug ("    dst: %s", dstname);
       if (len != ntohs (oh->length))  
         zlog_debug ("Message length does not match actually received: %d", len);  
   
       switch (oh->type)        switch (oh->type)
         {          {
Line 1671  ospf6_receive (struct thread *thread) Line 1607  ospf6_receive (struct thread *thread)
             ospf6_lsack_print (oh);              ospf6_lsack_print (oh);
             break;              break;
           default:            default:
            zlog_debug ("Unknown message");            assert (0);
            break; 
         }          }
     }      }
   
Line 1699  ospf6_receive (struct thread *thread) Line 1634  ospf6_receive (struct thread *thread)
         break;          break;
   
       default:        default:
        if (IS_OSPF6_DEBUG_MESSAGE (OSPF6_MESSAGE_TYPE_UNKNOWN, RECV))        assert (0);
          zlog_debug ("Unknown message"); 
        break; 
     }      }
   
   return 0;    return 0;
Line 1740  ospf6_send (struct in6_addr *src, struct in6_addr *dst Line 1673  ospf6_send (struct in6_addr *src, struct in6_addr *dst
       else        else
         memset (srcname, 0, sizeof (srcname));          memset (srcname, 0, sizeof (srcname));
       zlog_debug ("%s send on %s",        zlog_debug ("%s send on %s",
                 OSPF6_MESSAGE_TYPE_NAME (oh->type), oi->interface->name);                 LOOKUP (ospf6_message_type_str, oh->type), oi->interface->name);
       zlog_debug ("    src: %s", srcname);        zlog_debug ("    src: %s", srcname);
       zlog_debug ("    dst: %s", dstname);        zlog_debug ("    dst: %s", dstname);
   
Line 1774  ospf6_send (struct in6_addr *src, struct in6_addr *dst Line 1707  ospf6_send (struct in6_addr *src, struct in6_addr *dst
     zlog_err ("Could not send entire message");      zlog_err ("Could not send entire message");
 }  }
   
   static uint32_t
   ospf6_packet_max(struct ospf6_interface *oi)
   {
     assert (oi->ifmtu > sizeof (struct ip6_hdr));
     return oi->ifmtu - (sizeof (struct ip6_hdr));
   }
   
 int  int
 ospf6_hello_send (struct thread *thread)  ospf6_hello_send (struct thread *thread)
 {  {
Line 1820  ospf6_hello_send (struct thread *thread) Line 1760  ospf6_hello_send (struct thread *thread)
       if (on->state < OSPF6_NEIGHBOR_INIT)        if (on->state < OSPF6_NEIGHBOR_INIT)
         continue;          continue;
   
      if (p - sendbuf + sizeof (u_int32_t) > oi->ifmtu)      if (p - sendbuf + sizeof (u_int32_t) > ospf6_packet_max(oi))
         {          {
           if (IS_OSPF6_DEBUG_MESSAGE (OSPF6_MESSAGE_TYPE_HELLO, SEND))            if (IS_OSPF6_DEBUG_MESSAGE (OSPF6_MESSAGE_TYPE_HELLO, SEND))
             zlog_debug ("sending Hello message: exceeds I/F MTU");              zlog_debug ("sending Hello message: exceeds I/F MTU");
Line 1896  ospf6_dbdesc_send (struct thread *thread) Line 1836  ospf6_dbdesc_send (struct thread *thread)
   
           /* MTU check */            /* MTU check */
           if (p - sendbuf + sizeof (struct ospf6_lsa_header) >            if (p - sendbuf + sizeof (struct ospf6_lsa_header) >
              on->ospf6_if->ifmtu)              ospf6_packet_max(on->ospf6_if))
             {              {
               ospf6_lsa_unlock (lsa);                ospf6_lsa_unlock (lsa);
               break;                break;
Line 1930  ospf6_dbdesc_send_newone (struct thread *thread) Line 1870  ospf6_dbdesc_send_newone (struct thread *thread)
   for (lsa = ospf6_lsdb_head (on->summary_list); lsa;    for (lsa = ospf6_lsdb_head (on->summary_list); lsa;
        lsa = ospf6_lsdb_next (lsa))         lsa = ospf6_lsdb_next (lsa))
     {      {
      if (size + sizeof (struct ospf6_lsa_header) > on->ospf6_if->ifmtu)      if (size + sizeof (struct ospf6_lsa_header) > ospf6_packet_max(on->ospf6_if))
         {          {
           ospf6_lsa_unlock (lsa);            ospf6_lsa_unlock (lsa);
           break;            break;
Line 1997  ospf6_lsreq_send (struct thread *thread) Line 1937  ospf6_lsreq_send (struct thread *thread)
        lsa = ospf6_lsdb_next (lsa))         lsa = ospf6_lsdb_next (lsa))
     {      {
       /* MTU check */        /* MTU check */
      if (p - sendbuf + sizeof (struct ospf6_lsreq_entry) > on->ospf6_if->ifmtu)      if (p - sendbuf + sizeof (struct ospf6_lsreq_entry) > ospf6_packet_max(on->ospf6_if))
         {          {
           ospf6_lsa_unlock (lsa);            ospf6_lsa_unlock (lsa);
           break;            break;
Line 2066  ospf6_lsupdate_send_neighbor (struct thread *thread) Line 2006  ospf6_lsupdate_send_neighbor (struct thread *thread)
     {      {
       /* MTU check */        /* MTU check */
       if ( (p - sendbuf + (unsigned int)OSPF6_LSA_SIZE (lsa->header))        if ( (p - sendbuf + (unsigned int)OSPF6_LSA_SIZE (lsa->header))
          > on->ospf6_if->ifmtu)          > ospf6_packet_max(on->ospf6_if))
         {          {
           ospf6_lsa_unlock (lsa);            ospf6_lsa_unlock (lsa);
           break;            break;
Line 2086  ospf6_lsupdate_send_neighbor (struct thread *thread) Line 2026  ospf6_lsupdate_send_neighbor (struct thread *thread)
     {      {
       /* MTU check */        /* MTU check */
       if ( (p - sendbuf + (unsigned int)OSPF6_LSA_SIZE (lsa->header))        if ( (p - sendbuf + (unsigned int)OSPF6_LSA_SIZE (lsa->header))
          > on->ospf6_if->ifmtu)          > ospf6_packet_max(on->ospf6_if))
         {          {
           ospf6_lsa_unlock (lsa);            ospf6_lsa_unlock (lsa);
           break;            break;
Line 2159  ospf6_lsupdate_send_interface (struct thread *thread) Line 2099  ospf6_lsupdate_send_interface (struct thread *thread)
     {      {
       /* MTU check */        /* MTU check */
       if ( (p - sendbuf + ((unsigned int)OSPF6_LSA_SIZE (lsa->header)))        if ( (p - sendbuf + ((unsigned int)OSPF6_LSA_SIZE (lsa->header)))
          > oi->ifmtu)          > ospf6_packet_max(oi))
         {          {
           ospf6_lsa_unlock (lsa);            ospf6_lsa_unlock (lsa);
           break;            break;
Line 2226  ospf6_lsack_send_neighbor (struct thread *thread) Line 2166  ospf6_lsack_send_neighbor (struct thread *thread)
        lsa = ospf6_lsdb_next (lsa))         lsa = ospf6_lsdb_next (lsa))
     {      {
       /* MTU check */        /* MTU check */
      if (p - sendbuf + sizeof (struct ospf6_lsa_header) > on->ospf6_if->ifmtu)      if (p - sendbuf + sizeof (struct ospf6_lsa_header) > ospf6_packet_max(on->ospf6_if))
         {          {
           /* if we run out of packet size/space here,            /* if we run out of packet size/space here,
              better to try again soon. */               better to try again soon. */
Line 2286  ospf6_lsack_send_interface (struct thread *thread) Line 2226  ospf6_lsack_send_interface (struct thread *thread)
        lsa = ospf6_lsdb_next (lsa))         lsa = ospf6_lsdb_next (lsa))
     {      {
       /* MTU check */        /* MTU check */
      if (p - sendbuf + sizeof (struct ospf6_lsa_header) > oi->ifmtu)      if (p - sendbuf + sizeof (struct ospf6_lsa_header) > ospf6_packet_max(oi))
         {          {
           /* if we run out of packet size/space here,            /* if we run out of packet size/space here,
              better to try again soon. */               better to try again soon. */

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


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