]> git.ipfire.org Git - thirdparty/iproute2.git/commit
testsuite: Generate nlmsg blob at runtime
authorPhil Sutter <phil@nwl.cc>
Thu, 9 Feb 2017 10:50:54 +0000 (11:50 +0100)
committerStephen Hemminger <stephen@networkplumber.org>
Fri, 10 Feb 2017 01:28:48 +0000 (17:28 -0800)
commit886f2c43b5e6fb88da46cb22f6df6c7e50d79cc0
tree629cbc1c731e75a78a635b90e289687d64989517
parent72dfff6e11d3992b5581eae2e8cf7b9855e84477
testsuite: Generate nlmsg blob at runtime

Since netlink messages are in host byte order, shipping a pre-generated
nlmsg blob won't suffice on systems with different endianness. Therefore
generate the blob at runtime, so it's content fits the hosts endianness.

Note that the generated message will contain only a single interface
featuring two VFs instead of the full list before. Yet this is
sufficient, as it triggers the crash with iproute versions prior to
commit 8c29ae7cc2494 ("ip link: Fix crash on older kernels when show VF
dev").

Signed-off-by: Phil Sutter <phil@nwl.cc>
.gitignore
testsuite/Makefile
testsuite/tests/ip/link/dev_wo_vf_rate.nl [deleted file]
testsuite/tools/Makefile [new file with mode: 0644]
testsuite/tools/generate_nlmsg.c [new file with mode: 0644]