One possible way of supporting MPLS labels in bird 1.6
Lennert Buytenhek
buytenh at wantstofly.org
Thu Aug 17 09:11:59 CEST 2017
On Tue, Aug 15, 2017 at 06:16:29PM +0200, Christian Tacke wrote:
> Hi!
Hello!
> > Notes:
> [...]
> > * The netlink serialization code in bird 1.6 has a bug whereby if you
> > try to serialize an attribute that is not a multiple of 4 bytes long
> > (such as RTA_ENCAP_TYPE, which is needed for MPLS and has a payload
> > of only 2 bytes) it will round up the size in the netlink header
> > (which is wrong -- that field should reflect the length _without_
> > padding) but then send out a netlink message without the padding
> > appended if this was the last attribute in the message (which is also
> > wrong). Also, if you do try to serialize an attribute that is not a
> > multiple of 4 bytes long, then between 1 and 3 bytes of uninitialized
> > bird stack memory get leaked over netlink. (The netlink attributes
> > that upstream bird cares about are all multiples of 4 bytes long, so
> > this won't actually surface in current bird upstream.)
> [...]
>
> I don't know much about netlink etc and haven't looked at
> the code, but from this summary, it sounds like this should
> be fixed/included in bird, to avoid surprises in the
> future, when people want to do more interesting stuff with
> netlink.
>
> That said: Would it make sense to extract that part and
> submit it alone?
I'd be happy to do that, but I'm trying to hold back on the number of
discrete patches I'm submitting to this mailing list, because it seems
as if the more patches I submit, the smaller the chance they'll be
looked at. ;p
Cheers,
Lennert
More information about the Bird-users
mailing list