0601c0f9 | 03-Dec-2024 |
Gleb Smirnoff <glebius@FreeBSD.org> |
netlink: check buffer length fits into u_int
We may increase it to size_t later, KPI allows that already, but doesn't seem to be needed today.
Reviewed by: melifaro Differential Revision: https://
netlink: check buffer length fits into u_int
We may increase it to size_t later, KPI allows that already, but doesn't seem to be needed today.
Reviewed by: melifaro Differential Revision: https://reviews.freebsd.org/D47550
show more ...
|
a034c0ae | 03-Dec-2024 |
Gleb Smirnoff <glebius@FreeBSD.org> |
netlink: refactor writer initialization KPI
o Allow callers to initialize a writer that will malloc(9) with M_WAITOK. o Use size_t for expected malloc size. o Use correct types to initialize a group
netlink: refactor writer initialization KPI
o Allow callers to initialize a writer that will malloc(9) with M_WAITOK. o Use size_t for expected malloc size. o Use correct types to initialize a group writer. o Rename functions into nl_writer_ namespace instead of nlmsg_, cause they are working on nl_writer, not on nlmsg. o Make the KPI responsible to sparsely initialize the writer structure. o Garbage collect chain writer. Fixes 17083b94a915.
All current consumers are left as is, however some may benefit from M_WAITOK allocation as well as supplying a correct expected size.
Reviewed by: melifaro Differential Revision: https://reviews.freebsd.org/D47549
show more ...
|
f34aca55 | 21-Jun-2024 |
Gleb Smirnoff <glebius@FreeBSD.org> |
netlink/route: provide pre-2.6.19 Linux compat shim
The old Linux used 8-bit rtm_table field of the RTM_NEWROUTE message to specify routing table id. Modern netlink uses RTA_TABLE 32-bit attribute.
netlink/route: provide pre-2.6.19 Linux compat shim
The old Linux used 8-bit rtm_table field of the RTM_NEWROUTE message to specify routing table id. Modern netlink uses RTA_TABLE 32-bit attribute.
Unfortunately, there is modern software (namely bird) that would prefer the old API as long as the routing table id fits into 8-bit.
PR: 279662
show more ...
|