X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tc%2Fq_dsmark.c;h=cdb5bf2f3399e17d4b4e8d5e7063ba1269112887;hb=fcabec0aee42af28e2846ef3674ed7ba7be72c42;hp=384e749dddca78543f6a4a92d254efecf550a895;hpb=cb820e861caa85bb3942ab0c673e04b9408be0ad;p=iproute2.git diff --git a/tc/q_dsmark.c b/tc/q_dsmark.c index 384e749..cdb5bf2 100644 --- a/tc/q_dsmark.c +++ b/tc/q_dsmark.c @@ -136,11 +136,9 @@ static int dsmark_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) { struct rtattr *tb[TCA_DSMARK_MAX+1]; - if (opt == NULL) - return 0; - - parse_rtattr_nested(tb, TCA_DSMARK_MAX, opt); - + if (!opt) return 0; + memset(tb, 0, sizeof(tb)); + parse_rtattr(tb, TCA_DSMARK_MAX, RTA_DATA(opt), RTA_PAYLOAD(opt)); if (tb[TCA_DSMARK_MASK]) { if (!RTA_PAYLOAD(tb[TCA_DSMARK_MASK])) fprintf(stderr,"dsmark: empty mask\n");