Fix tc pfifo_fast with options

This commit is contained in:
shemminger 2005-10-07 16:33:21 +00:00
parent e8f6df694a
commit f453a0d451
3 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2005-10-07 Mike Frysinger <vapier@gentoo.org>
* Handle pfifo_fast that has no qopt without segfaulting
2005-10-05 Mads Martin Joergensen <mmj@suse.de> 2005-10-05 Mads Martin Joergensen <mmj@suse.de>
* Trivial netem ccopts * Trivial netem ccopts

View File

@ -38,7 +38,7 @@ int use_iec = 0;
int force = 0; int force = 0;
struct rtnl_handle rth; 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 qdisc_util * qdisc_list;
static struct filter_util * filter_list; static struct filter_util * filter_list;

View File

@ -126,6 +126,10 @@ int tc_qdisc_modify(int cmd, unsigned flags, int argc, char **argv)
addattr_l(&req.n, sizeof(req), TCA_RATE, &est, sizeof(est)); addattr_l(&req.n, sizeof(req), TCA_RATE, &est, sizeof(est));
if (q) { 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)) if (q->parse_qopt(q, argc, argv, &req.n))
return 1; return 1;
} else { } else {