]> granicus.if.org Git - strace/commit
rtnl_mdb: decode messages regardless of availability of kernel headers
authorEugene Syromyatnikov <evgsyr@gmail.com>
Thu, 10 Oct 2019 11:58:44 +0000 (13:58 +0200)
committerDmitry V. Levin <ldv@altlinux.org>
Sat, 19 Oct 2019 16:01:47 +0000 (16:01 +0000)
commite1a9e0f35d5e711e8b28044155b2e29b33943c8f
tree594acc07ec80d108699d78e53e1da52ec18de578
parent0f99f89cd90992148e426f288c9bf7df994e8943
rtnl_mdb: decode messages regardless of availability of kernel headers

* netlink_route.c [!HAVE_STRUCT_BR_PORT_MSG]: Do not skip decoding of
RTM_DELMDB, RTM_GETMDB, and RTM_NEWMDB messages.
* rtnl_mdb.c: Remove #ifdef HAVE_STRUCT_BR_PORT_MSG guard.
(struct_br_port_msg, struct_br_mdb_entry): New typedefs.
[HAVE_STRUCT_BR_PORT_MSG]: Static assert check for struct br_port_msg
size.
[HAVE_STRUCT_BR_NDB_ENTRY]: Static assert check for strucr br_mdb_entry
size.
(decode_mdba_mdb_entry_info) [!HAVE_STRUCT_BR_MDB_ENTRY]: Remove.
(decode_mdba_mdb_entry_info): Change entry type to struct_br_mdb_entry.
(decode_mdba_mdb_entry_info) [HAVE_STRUCT_BR_MDB_ENTRY_FLAGS,
HAVE_STRUCT_BR_MDB_ENTRY_VID]: Remove guards.
(decode_br_port_msg): Change bpm type to struct_br_port_msg.
* tests/nlattr_ifinfomsg.c: Use TEST_NLATTR_OBJECT_MINSZ to test
struct rtnl_link_stats printing.
* tests/nlattr_mdba_mdb_entry.c: Update expected output.

References: https://bugzilla.redhat.com/show_bug.cgi?id=1758201
netlink_route.c
rtnl_mdb.c
tests/nlattr_ifinfomsg.c
tests/nlattr_mdba_mdb_entry.c