diff options
Diffstat (limited to 'networking/tc.c')
-rw-r--r-- | networking/tc.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/networking/tc.c b/networking/tc.c index d0bcbdeaa..25875aa3e 100644 --- a/networking/tc.c +++ b/networking/tc.c | |||
@@ -7,6 +7,22 @@ | |||
7 | * Bernhard Reutner-Fischer adjusted for busybox | 7 | * Bernhard Reutner-Fischer adjusted for busybox |
8 | */ | 8 | */ |
9 | 9 | ||
10 | /* Was disabled in 2008 by Bernhard, not known why. | ||
11 | --//config:#config TC | ||
12 | --//config:# bool "tc" | ||
13 | --//config:# default y | ||
14 | --//config:# help | ||
15 | --//config:# Show / manipulate traffic control settings | ||
16 | --//config:# | ||
17 | --//config:#config FEATURE_TC_INGRESS | ||
18 | --//config:# default y | ||
19 | --//config:# depends on TC | ||
20 | -- | ||
21 | --//applet:IF_TC(APPLET(tc, BB_DIR_SBIN, BB_SUID_DROP)) | ||
22 | -- | ||
23 | --//kbuild:lib-$(CONFIG_TC) += tc.o | ||
24 | */ | ||
25 | |||
10 | //usage:#define tc_trivial_usage | 26 | //usage:#define tc_trivial_usage |
11 | /* //usage: "[OPTIONS] OBJECT CMD [dev STRING]" */ | 27 | /* //usage: "[OPTIONS] OBJECT CMD [dev STRING]" */ |
12 | //usage: "OBJECT CMD [dev STRING]" | 28 | //usage: "OBJECT CMD [dev STRING]" |
@@ -100,7 +116,7 @@ static int get_qdisc_handle(uint32_t *h, const char *str) { | |||
100 | char *p; | 116 | char *p; |
101 | 117 | ||
102 | maj = TC_H_UNSPEC; | 118 | maj = TC_H_UNSPEC; |
103 | if (!strcmp(str, "none")) | 119 | if (strcmp(str, "none") == 0) |
104 | goto ok; | 120 | goto ok; |
105 | maj = strtoul(str, &p, 16); | 121 | maj = strtoul(str, &p, 16); |
106 | if (p == str) | 122 | if (p == str) |
@@ -119,10 +135,10 @@ static int get_tc_classid(uint32_t *h, const char *str) { | |||
119 | char *p; | 135 | char *p; |
120 | 136 | ||
121 | maj = TC_H_ROOT; | 137 | maj = TC_H_ROOT; |
122 | if (!strcmp(str, "root")) | 138 | if (strcmp(str, "root") == 0) |
123 | goto ok; | 139 | goto ok; |
124 | maj = TC_H_UNSPEC; | 140 | maj = TC_H_UNSPEC; |
125 | if (!strcmp(str, "none")) | 141 | if (strcmp(str, "none") == 0) |
126 | goto ok; | 142 | goto ok; |
127 | maj = strtoul(str, &p, 16); | 143 | maj = strtoul(str, &p, 16); |
128 | if (p == str) { | 144 | if (p == str) { |