diff --git a/tc/tc_common.h b/tc/tc_common.h index e19a867e..82f59e86 100644 --- a/tc/tc_common.h +++ b/tc/tc_common.h @@ -1,3 +1,6 @@ + +#define TCA_BUF_MAX (64*1024) + extern int do_qdisc(int argc, char **argv); extern int do_class(int argc, char **argv); extern int do_filter(int argc, char **argv); diff --git a/tc/tc_qdisc.c b/tc/tc_qdisc.c index 1a244a87..eb451a47 100644 --- a/tc/tc_qdisc.c +++ b/tc/tc_qdisc.c @@ -44,15 +44,15 @@ static void usage(void) int tc_qdisc_modify(int cmd, unsigned flags, int argc, char **argv) { struct rtnl_handle rth; - struct { - struct nlmsghdr n; - struct tcmsg t; - char buf[4096]; - } req; struct qdisc_util *q = NULL; struct tc_estimator est; char d[16]; char k[16]; + struct { + struct nlmsghdr n; + struct tcmsg t; + char buf[TCA_BUF_MAX]; + } req; memset(&req, 0, sizeof(req)); memset(&est, 0, sizeof(est));