One possible way of supporting MPLS labels in bird 1.6
Christian Tacke
Christian.Tacke+bird.network.cz at cosmokey.com
Tue Aug 15 18:16:29 CEST 2017
Hi!
On Sat, Aug 12, 2017 at 19:41:54 +0300, Lennert Buytenhek wrote:
[...]
> 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?
Cheers
Christian
--
www.cosmokey.com
More information about the Bird-users
mailing list