diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2014-09-20 10:25:30 +0400 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2014-09-20 10:25:30 +0400 |
commit | 0a58c20b44136c1fba996becea18696b3f67a1f9 (patch) | |
tree | 2b6da091898d6f4b69a36d035c70cb8e27876b71 | |
parent | 806fbb0bb5e7b42cc03aea3f110df72aeb2fd84c (diff) | |
parent | 62dbbf500dd47c412102d9f3e9fc905bcbc3a617 (diff) | |
download | accel-ppp-0a58c20b44136c1fba996becea18696b3f67a1f9.tar.gz accel-ppp-0a58c20b44136c1fba996becea18696b3f67a1f9.zip |
Merge branch 'master' of ssh://git.code.sf.net/p/accel-ppp/code
-rw-r--r-- | accel-pppd/shaper/leaf_qdisc.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/accel-pppd/shaper/leaf_qdisc.c b/accel-pppd/shaper/leaf_qdisc.c index 4240a344..6c90968a 100644 --- a/accel-pppd/shaper/leaf_qdisc.c +++ b/accel-pppd/shaper/leaf_qdisc.c @@ -153,6 +153,7 @@ out: return 0; } +#ifdef TCA_FQ_CODEL_MAX static int parse_fq_codel(char *str) { char *ptr1, *ptr2; @@ -215,7 +216,7 @@ out: return 0; } - +#endif void leaf_qdisc_parse(const char *opt) { @@ -232,9 +233,11 @@ void leaf_qdisc_parse(const char *opt) if (strcmp(str, "sfq") == 0) { if (parse_sfq(ptr1)) goto out_err; +#ifdef TCA_FQ_CODEL_MAX } if (strcmp(str, "fq_codel") == 0) { if (parse_fq_codel(ptr1)) goto out_err; +#endif } else log_emerg("shaper: unknown leaf-qdisc '%s'\n", str); @@ -270,6 +273,7 @@ static int install_sfq(struct rtnl_handle *rth, int ifindex, int parent, int han return tc_qdisc_modify(rth, ifindex, RTM_NEWQDISC, NLM_F_EXCL|NLM_F_CREATE, &opt); } +#ifdef TCA_FQ_CODEL_MAX static int qdisc_fq_codel(struct qdisc_opt *qopt, struct nlmsghdr *n) { struct rtattr *tail = NLMSG_TAIL(n); @@ -305,14 +309,17 @@ static int install_fq_codel(struct rtnl_handle *rth, int ifindex, int parent, in return tc_qdisc_modify(rth, ifindex, RTM_NEWQDISC, NLM_F_EXCL|NLM_F_CREATE, &opt); } +#endif int install_leaf_qdisc(struct rtnl_handle *rth, int ifindex, int parent, int handle) { if (conf_leaf_qdisc == LEAF_QDISC_SFQ) return install_sfq(rth, ifindex, parent, handle); - if (conf_leaf_qdisc == LEAF_QDISC_FQ_CODEL) +#ifdef TCA_FQ_CODEL_MAX + else if (conf_leaf_qdisc == LEAF_QDISC_FQ_CODEL) return install_fq_codel(rth, ifindex, parent, handle); +#endif return 0; } |