0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-18 17:18:42 +00:00
bird/proto/babel
Toke Høiland-Jørgensen db2d29073a lib/slab: introduce sl_allocz() function and use it in Babel
The babel protocol code was initialising objects returned from the slab
allocator by assigning to each of the struct members individually, but
wasn't touching the NODE member while doing so. This leads to warnings on
debug builds since commit:

baac700906 ("List expensive check.")

To fix this, introduce an sl_allocz() variant of the slab allocator which
will zero out the memory before returning it, and switch all the babel call
sites to use this version. The overhead for doing this should be negligible
for small objects, and in the case of babel, the largest object being
allocated was being zeroed anyway, so we can drop the memset in
babel_read_tlv().
2020-11-24 02:36:31 +01:00
..
babel.c lib/slab: introduce sl_allocz() function and use it in Babel 2020-11-24 02:36:31 +01:00
babel.h Configuration strings are constant. 2020-04-09 15:37:14 +02:00
config.Y Show info from multiple protocols when protocol is not specified 2020-06-28 15:38:47 +02:00
Doc Doc: Rename code documentation files back to Doc 2018-12-14 02:03:42 +01:00
Makefile Minor cleanups 2016-12-13 20:18:11 +01:00
packets.c lib/slab: introduce sl_allocz() function and use it in Babel 2020-11-24 02:36:31 +01:00