X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tc%2Fq_dsmark.c;fp=tc%2Fq_dsmark.c;h=cdb5bf2f3399e17d4b4e8d5e7063ba1269112887;hb=b4a5a91c5a4ca186690479ddc0fff26644c98c93;hp=384e749dddca78543f6a4a92d254efecf550a895;hpb=143d7e99faac73b7f2947e37df31a75738eeadde;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");