]> git.puffer.fish Git - mirror/frr.git/commit
ospf6d: fix rx/tx buffer sizes 11329/head
authorDavid Lamparter <equinox@opensourcerouting.org>
Wed, 1 Jun 2022 15:10:11 +0000 (17:10 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Wed, 1 Jun 2022 15:10:11 +0000 (17:10 +0200)
commitc047b50638fd4bd9c5990ae0abf8195598c1929f
tree3731f96e7fa97aca7f38689492debfd547094cad
parentf5b2f86ac0ccaecaed248e8cc80569c3c274e70b
ospf6d: fix rx/tx buffer sizes

OSPFv3 packets can be fragmented and up to 64k long, regardless of
interface MTU.  Trying to size these buffers to MTU is just plain wrong.
To not make this a super intrusive change during the 8.3 release freeze,
just code this into ospf6_iobuf_size().

Since the buffer is now always 64k, don't waste time zeroing the entire
thing in receive;  instead just zero kind of a "sled" of 128 bytes after
the buffer as a security precaution.

Fixes: #11298
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
ospf6d/ospf6_message.c