]> granicus.if.org Git - libnl/commit
lib/qdisc: avoid BUG() in "lib/route/qdisc/mqprio.c"
authorThomas Haller <thaller@redhat.com>
Tue, 9 Oct 2018 13:27:01 +0000 (15:27 +0200)
committerThomas Haller <thaller@redhat.com>
Tue, 9 Oct 2018 13:31:39 +0000 (15:31 +0200)
commitb7419a1bcef0270b8fd861306f6f03f5fbecd955
treef9f5b1cf6c5bba2c6560d5db39084ca4799596ae
parent8a6c8e548d584a35dd8273a59bf82eb6b4b619a5
lib/qdisc: avoid BUG() in "lib/route/qdisc/mqprio.c"

BUG() raises an assertion. It seems overly harsh.

For example, rtnl_tc_data() can fail if we fail to allocate
memory. Asserting against that, makes libnl3 not out-of-memory
safe.

Just return a regular error.
include/netlink/route/qdisc/mqprio.h
lib/route/qdisc/mqprio.c