]> git.puffer.fish Git - matthieu/frr.git/commit
ospfd: Prioritise hellos for sending by queueing to head of output buffer
authorPaul Jakma <paul@quagga.net>
Fri, 8 Jan 2010 17:11:15 +0000 (17:11 +0000)
committerPaul Jakma <paul@quagga.net>
Wed, 8 Dec 2010 17:11:19 +0000 (17:11 +0000)
commitaa276fd783f5cdbeefe22bf54109fe523a465e07
tree7427b7bdfd25a9f07c72461d56c3981db9761227
parent57c5c6526df82970ca24293798d278862cf55106
ospfd: Prioritise hellos for sending by queueing to head of output buffer

* It's possible for the packet output buffer to be filled up with a long
  series of non-Hello packets in between Hellos packets, such that the
  router's neighbours don't receive the Hello packet in time, even though
  the hello-timer ran at about the right time. Fix this by prioritising
  Hello packets, letting them skip the queue and go ahead of any packets
  already on the queue.

  This problem can occur when there are lots of LSAs and slow links.

* ospf_packet.h: (ospf_hello_send_sub) not used outside of ospf_packet.c
* ospf_packet.c: (ospf_fifo_push_head) add packet to head of fifo (so its
  no longer really a fifo, but hey)
  (ospf_packet_add_top) add packet to top of the packet output queue.
  (ospf_hello_send_sub) Put Hello's at the top of the packet output queue.
  make it take in_addr_t parameter, so that this
  ospf_hello_send can re-use this code too.
  (ospf_hello_send) consolidate code by using ospf_hello_send_sub
  (ospf_poll_send,ospf_hello_reply_timer) adjust for ospf_hello_send_sub.
ospfd/ospf_packet.c
ospfd/ospf_packet.h