From b7fe4141123c6fc26fffec68d0db62ecf474c074 Mon Sep 17 00:00:00 2001 From: Denis Ovsienko Date: Tue, 21 Aug 2007 16:32:56 +0000 Subject: Bug #362 is fixed now. --- ospfd/ospf_packet.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ospfd/ospf_packet.c') diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index 4735f99b..a778a50b 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -602,8 +602,12 @@ ospf_write (struct thread *thread) ipid = (time(NULL) & 0xffff); #endif /* WANT_OSPF_WRITE_FRAGMENT */ - /* convenience - max OSPF data per packet */ - maxdatasize = oi->ifp->mtu - sizeof (struct ip); + /* convenience - max OSPF data per packet, + * and reliability - not more data, than our + * socket can accept + */ + maxdatasize = MIN (oi->ifp->mtu, ospf->maxsndbuflen) - + sizeof (struct ip); /* Get one packet from queue. */ op = ospf_fifo_head (oi->obuf); -- cgit v1.2.1