summaryrefslogtreecommitdiff
path: root/ospfd/ospf_packet.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2016-12-07 13:21:45 -0200
committerDavid Lamparter <equinox@opensourcerouting.org>2016-12-08 12:50:25 +0100
commitde587d745e3b8b75cf92b2bff78af370adddb39f (patch)
tree4677ff51ed2c85ad085af409ba06da6067b68cc3 /ospfd/ospf_packet.c
parent4743c4e4dfcbadc711f41508ebf6f17ed3253b1b (diff)
ospfd: set the OSPF socket's send buffer size only once
This reverts commit b7fe4141, which introduced a logic where the OSPF send buffer size was dynamically updated to reflect the maximum MTU of the OSPF enabled interfaces (this was done to make ospfd work with interfaces configured for jumbo frames). Since commit a78d75b0, this is not necessary anymore because ospf_sock_init() now sets the OSPF send buffer size to a very high value (8MB). Also, the previous logic was broken because it didn't account for run-time interface MTU changes. Signed-off-by: Renato Westphal <renato@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ospfd/ospf_packet.c')
-rw-r--r--ospfd/ospf_packet.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index 72ce5586f6..f7d1d0fa7d 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -691,13 +691,9 @@ ospf_write (struct thread *thread)
last_serviced_oi = oi;
}
pkt_count++;
- /* convenience - max OSPF data per packet,
- * and reliability - not more data, than our
- * socket can accept
- */
#ifdef WANT_OSPF_WRITE_FRAGMENT
- maxdatasize = MIN (oi->ifp->mtu, ospf->maxsndbuflen) -
- sizeof (struct ip);
+ /* convenience - max OSPF data per packet */
+ maxdatasize = oi->ifp->mtu - sizeof (struct ip);
#endif /* WANT_OSPF_WRITE_FRAGMENT */
/* Get one packet from queue. */
op = ospf_fifo_head (oi->obuf);