Commit 95812b56 authored by net[shemminger]!kaber's avatar net[shemminger]!kaber

: prevent tc crashes

(Logical change 1.81)
parent d31187b7
......@@ -87,7 +87,7 @@ restart_s:
}
}
snprintf(buf, sizeof(buf), "%s_util", str);
snprintf(buf, sizeof(buf), "%s_action_util", str);
a = dlsym(dlh, buf);
if (a == NULL)
goto noexist;
......
......@@ -239,7 +239,7 @@ print_gact(struct action_util *au,FILE * f, struct rtattr *arg)
return 0;
}
struct action_util gact_util = {
struct action_util gact_action_util = {
.id = "gact",
.parse_aopt = parse_gact,
.print_aopt = print_gact,
......
......@@ -26,7 +26,7 @@
#include "utils.h"
#include "tc_util.h"
struct action_util police_util = {
struct action_util police_action_util = {
.id = "police",
.parse_aopt = act_parse_police,
.print_aopt = print_police,
......@@ -356,5 +356,5 @@ print_police(struct action_util *a, FILE *f, struct rtattr *arg)
int
tc_print_police(FILE *f, struct rtattr *arg) {
return print_police(&police_util,f,arg);
return print_police(&police_action_util,f,arg);
}
......@@ -250,7 +250,7 @@ static int atm_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
}
struct qdisc_util atm_util = {
struct qdisc_util atm_qdisc_util = {
.id = "atm",
.parse_qopt = atm_parse_opt,
.print_qopt = atm_print_opt,
......
......@@ -542,7 +542,7 @@ static int cbq_print_xstats(struct qdisc_util *qu, FILE *f, struct rtattr *xstat
return 0;
}
struct qdisc_util cbq_util = {
struct qdisc_util cbq_qdisc_util = {
.id = "cbq",
.parse_qopt = cbq_parse_opt,
.print_qopt = cbq_print_opt,
......
......@@ -168,7 +168,7 @@ static int dsmark_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
}
struct qdisc_util dsmark_util = {
struct qdisc_util dsmark_qdisc_util = {
.id = "dsmark",
.parse_qopt = dsmark_parse_opt,
.print_qopt = dsmark_print_opt,
......
......@@ -79,20 +79,20 @@ static int fifo_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
}
struct qdisc_util bfifo_util = {
struct qdisc_util bfifo_qdisc_util = {
.id = "bfifo",
.parse_qopt = fifo_parse_opt,
.print_qopt = fifo_print_opt,
};
struct qdisc_util pfifo_util = {
struct qdisc_util pfifo_qdisc_util = {
.id = "pfifo",
.parse_qopt = fifo_parse_opt,
.print_qopt = fifo_print_opt,
};
extern int prio_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt);
struct qdisc_util pfifo_fast_util = {
struct qdisc_util pfifo_fast_qdisc_util = {
.id = "pfifo_fast",
.print_qopt = prio_print_opt,
};
......@@ -329,7 +329,7 @@ static int gred_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
return 0;
}
struct qdisc_util gred_util = {
struct qdisc_util gred_qdisc_util = {
.id = "gred",
.parse_qopt = gred_parse_opt,
.print_qopt = gred_print_opt,
......
......@@ -277,7 +277,7 @@ hfsc_print_class_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
return 0;
}
struct qdisc_util hfsc_util = {
struct qdisc_util hfsc_qdisc_util = {
.id = "hfsc",
.parse_qopt = hfsc_parse_opt,
.print_qopt = hfsc_print_opt,
......
......@@ -311,7 +311,7 @@ static int htb_print_xstats(struct qdisc_util *qu, FILE *f, struct rtattr *xstat
return 0;
}
struct qdisc_util htb_util = {
struct qdisc_util htb_qdisc_util = {
.id = "htb",
.parse_qopt = htb_parse_opt,
.print_qopt = htb_print_opt,
......@@ -321,7 +321,7 @@ struct qdisc_util htb_util = {
};
/* for testing of old one */
struct qdisc_util htb2_util = {
struct qdisc_util htb2_qdisc_util = {
.id = "htb2",
.parse_qopt = htb_parse_opt,
.print_qopt = htb_print_opt,
......
......@@ -62,7 +62,7 @@ static int ingress_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
return 0;
}
struct qdisc_util ingress_util = {
struct qdisc_util ingress_qdisc_util = {
.id = "ingress",
.parse_qopt = ingress_parse_opt,
.print_qopt = ingress_print_opt,
......
......@@ -285,7 +285,7 @@ static int netem_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
return 0;
}
struct qdisc_util netem_util = {
struct qdisc_util netem_qdisc_util = {
.id = "netem",
.parse_qopt = netem_parse_opt,
.print_qopt = netem_print_opt,
......
......@@ -111,7 +111,7 @@ int prio_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
return 0;
}
struct qdisc_util prio_util = {
struct qdisc_util prio_qdisc_util = {
.id = "prio",
.parse_qopt = prio_parse_opt,
.print_qopt = prio_print_opt,
......
......@@ -213,7 +213,7 @@ static int red_print_xstats(struct qdisc_util *qu, FILE *f, struct rtattr *xstat
}
struct qdisc_util red_util = {
struct qdisc_util red_qdisc_util = {
.id = "red",
.parse_qopt = red_parse_opt,
.print_qopt = red_print_opt,
......
......@@ -100,7 +100,7 @@ static int sfq_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
return 0;
}
struct qdisc_util sfq_util = {
struct qdisc_util sfq_qdisc_util = {
.id = "sfq",
.parse_qopt = sfq_parse_opt,
.print_qopt = sfq_print_opt,
......
......@@ -257,7 +257,7 @@ static int tbf_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
return 0;
}
struct qdisc_util tbf_util = {
struct qdisc_util tbf_qdisc_util = {
.id = "tbf",
.parse_qopt = tbf_parse_opt,
.print_qopt = tbf_print_opt,
......
......@@ -107,7 +107,7 @@ struct qdisc_util *get_qdisc_kind(const char *str)
}
}
snprintf(buf, sizeof(buf), "%s_util", str);
snprintf(buf, sizeof(buf), "%s_qdisc_util", str);
q = dlsym(dlh, buf);
if (q == NULL)
goto noexist;
......@@ -152,7 +152,7 @@ struct filter_util *get_filter_kind(const char *str)
}
}
snprintf(buf, sizeof(buf), "%s_util", str);
snprintf(buf, sizeof(buf), "%s_filter_util", str);
q = dlsym(dlh, buf);
if (q == NULL)
goto noexist;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment