~ubuntu-branches/ubuntu/saucy/quagga/saucy

« back to all changes in this revision

Viewing changes to ospfd/ospf_packet.c

  • Committer: Bazaar Package Importer
  • Author(s): Stephan Hermann
  • Date: 2007-09-14 09:47:54 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20070914094754-kqi815lcg6n8mh51
Tags: 0.99.9-1ubuntu1
* Merged new upstream version (LP: #139376)
  - Merged debian/changelog
* Fixes a DoS and some bugs introduced in 0.99.8
  (see: http://www.quagga.net/news2.php?y=2007&m=9&d=7#id1189190760)
* Remaining Ubuntu Patches:
  - debian/rules: use bash as shell
  - debian/quagga.prerm: handle upgrades more gracefully
  - debian/patches/81_32bit_u64.dpatch: Define __u64 as uint64_t
    before including the netlink headers, since that symbol does not exist
    by default on 32 bit arches. Fixes i386/powerpc FTBFS.
  - debian/patches/83_ifaddr_defs.dpatch:
    zebra/rt_netlink.c: #include <linux/if_addr.h> and define IF[L]A_RTA
    macros, so that the file compiles again with our kernel headers.
  - debian/patches/20_ht-20061217-0.99.6-bgp-md5.dpatch: updated for
    linux kernel 2.6.20.

Show diffs side-by-side

added added

removed removed

Lines of Context:
602
602
    ipid = (time(NULL) & 0xffff);
603
603
#endif /* WANT_OSPF_WRITE_FRAGMENT */
604
604
 
605
 
  /* convenience - max OSPF data per packet */
606
 
  maxdatasize = oi->ifp->mtu - sizeof (struct ip);
 
605
  /* convenience - max OSPF data per packet,
 
606
   * and reliability - not more data, than our
 
607
   * socket can accept
 
608
   */
 
609
  maxdatasize = MIN (oi->ifp->mtu, ospf->maxsndbuflen) -
 
610
    sizeof (struct ip);
607
611
  
608
612
  /* Get one packet from queue. */
609
613
  op = ospf_fifo_head (oi->obuf);
628
632
  memset (&sa_dst, 0, sizeof (sa_dst));
629
633
  
630
634
  sa_dst.sin_family = AF_INET;
631
 
#ifdef HAVE_SIN_LEN
 
635
#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
632
636
  sa_dst.sin_len = sizeof(sa_dst);
633
 
#endif /* HAVE_SIN_LEN */
 
637
#endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */
634
638
  sa_dst.sin_addr = op->dst;
635
639
  sa_dst.sin_port = htons (0);
636
640