Fix tc pfifo_fast with options
diff --git a/tc/tc.c b/tc/tc.c
index 16d6c79..fa36ee0 100644
--- a/tc/tc.c
+++ b/tc/tc.c
@@ -38,7 +38,7 @@
int force = 0;
struct rtnl_handle rth;
-static void *BODY; /* cached handle dlopen(NULL) */
+static void *BODY = NULL; /* cached handle dlopen(NULL) */
static struct qdisc_util * qdisc_list;
static struct filter_util * filter_list;
diff --git a/tc/tc_qdisc.c b/tc/tc_qdisc.c
index 7802d52..e9174ab 100644
--- a/tc/tc_qdisc.c
+++ b/tc/tc_qdisc.c
@@ -126,6 +126,10 @@
addattr_l(&req.n, sizeof(req), TCA_RATE, &est, sizeof(est));
if (q) {
+ if (!q->parse_qopt) {
+ fprintf(stderr, "qdisc '%s' does not support option parsing\n", k);
+ return -1;
+ }
if (q->parse_qopt(q, argc, argv, &req.n))
return 1;
} else {