diff options
author | David Ahern <dsahern@kernel.org> | 2022-07-01 08:39:43 -0600 |
---|---|---|
committer | David Ahern <dsahern@kernel.org> | 2022-07-01 08:39:43 -0600 |
commit | 37f3cb9be0617756699563a434465101f7b69285 (patch) | |
tree | ebdeec162a6abc97c155c7767b74be91bbb1efb5 | |
parent | a10a197d715d9a9671b3c6ea0d26471875754fd7 (diff) | |
parent | 024103923a5c826e40c993be4ee2ada5536cb66a (diff) | |
download | iproute2-37f3cb9be0617756699563a434465101f7b69285.tar.gz |
Merge branch 'main' into next
Signed-off-by: David Ahern <dsahern@kernel.org>
-rw-r--r-- | genl/genl_utils.h | 4 | ||||
-rw-r--r-- | ip/ipaddress.c | 4 | ||||
-rw-r--r-- | ip/ipl2tp.c | 2 | ||||
-rw-r--r-- | man/man8/tc-ct.8 | 4 | ||||
-rw-r--r-- | man/man8/tc-fq_codel.8 | 3 | ||||
-rw-r--r-- | tc/f_basic.c | 6 | ||||
-rw-r--r-- | tc/f_bpf.c | 6 | ||||
-rw-r--r-- | tc/f_flower.c | 14 | ||||
-rw-r--r-- | tc/f_fw.c | 6 | ||||
-rw-r--r-- | tc/f_matchall.c | 6 | ||||
-rw-r--r-- | tc/f_route.c | 6 | ||||
-rw-r--r-- | tc/f_rsvp.c | 6 |
12 files changed, 34 insertions, 33 deletions
diff --git a/genl/genl_utils.h b/genl/genl_utils.h index 87b4f34c5..9fbeba75b 100644 --- a/genl/genl_utils.h +++ b/genl/genl_utils.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 */ -#ifndef _TC_UTIL_H_ -#define _TC_UTIL_H_ 1 +#ifndef _GENL_UTILS_H_ +#define _GENL_UTILS_H_ 1 #include <linux/genetlink.h> #include "utils.h" diff --git a/ip/ipaddress.c b/ip/ipaddress.c index 67403185c..e0eb41bc8 100644 --- a/ip/ipaddress.c +++ b/ip/ipaddress.c @@ -549,7 +549,7 @@ static void print_vfinfo(FILE *fp, struct ifinfomsg *ifi, struct rtattr *vfinfo) void size_columns(unsigned int cols[], unsigned int n, ...) { unsigned int i, len; - uint64_t val, powi; + uint64_t val; va_list args; va_start(args, n); @@ -560,7 +560,7 @@ void size_columns(unsigned int cols[], unsigned int n, ...) if (human_readable) continue; - for (len = 1, powi = 10; powi < val; len++, powi *= 10) + for (len = 1; val > 9; len++, val /= 10) /* nothing */; if (len > cols[i]) cols[i] = len; diff --git a/ip/ipl2tp.c b/ip/ipl2tp.c index 569723581..f1d574de3 100644 --- a/ip/ipl2tp.c +++ b/ip/ipl2tp.c @@ -258,7 +258,7 @@ static void print_tunnel(const struct l2tp_data *data) NULL, p->udp6_csum_tx); print_bool(PRINT_JSON, "checksum_rx", - NULL, p->udp6_csum_tx); + NULL, p->udp6_csum_rx); } else { printf(" UDP checksum: %s%s%s%s\n", p->udp6_csum_tx && p->udp6_csum_rx diff --git a/man/man8/tc-ct.8 b/man/man8/tc-ct.8 index 709e62a99..2fb81ca29 100644 --- a/man/man8/tc-ct.8 +++ b/man/man8/tc-ct.8 @@ -74,8 +74,8 @@ Example showing natted firewall in conntrack zone 2, and conntrack mark usage: #Add ingress qdisc on eth0 and eth1 interfaces .nf -$ tc qdisc add dev eth0 handle ingress -$ tc qdisc add dev eth1 handle ingress +$ tc qdisc add dev eth0 ingress +$ tc qdisc add dev eth1 ingress #Setup filters on eth0, allowing opening new connections in zone 2, and doing src nat + mark for each new connection $ tc filter add dev eth0 ingress prio 1 chain 0 proto ip flower ip_proto tcp ct_state -trk \\ diff --git a/man/man8/tc-fq_codel.8 b/man/man8/tc-fq_codel.8 index 84340fe57..43f650840 100644 --- a/man/man8/tc-fq_codel.8 +++ b/man/man8/tc-fq_codel.8 @@ -66,7 +66,8 @@ the local minimum queue delay that packets experience. Default value is 5ms. has the same semantics as .B codel and is used to ensure that the measured minimum delay does not become too stale. -The minimum delay must be experienced in the last epoch of length .B interval. +The minimum delay must be experienced in the last epoch of length +.BR interval . It should be set on the order of the worst-case RTT through the bottleneck to give endpoints sufficient time to react. Default value is 100ms. diff --git a/tc/f_basic.c b/tc/f_basic.c index 7b19cea6e..9a60758e8 100644 --- a/tc/f_basic.c +++ b/tc/f_basic.c @@ -70,14 +70,14 @@ static int basic_parse_opt(struct filter_util *qu, char *handle, continue; } else if (matches(*argv, "classid") == 0 || strcmp(*argv, "flowid") == 0) { - unsigned int handle; + unsigned int classid; NEXT_ARG(); - if (get_tc_classid(&handle, *argv)) { + if (get_tc_classid(&classid, *argv)) { fprintf(stderr, "Illegal \"classid\"\n"); return -1; } - addattr_l(n, MAX_MSG, TCA_BASIC_CLASSID, &handle, 4); + addattr_l(n, MAX_MSG, TCA_BASIC_CLASSID, &classid, 4); } else if (matches(*argv, "action") == 0) { NEXT_ARG(); if (parse_action(&argc, &argv, TCA_BASIC_ACT, n)) { diff --git a/tc/f_bpf.c b/tc/f_bpf.c index fa3552aef..96e4576aa 100644 --- a/tc/f_bpf.c +++ b/tc/f_bpf.c @@ -126,14 +126,14 @@ opt_bpf: bpf_uds_name = cfg.uds; } else if (matches(*argv, "classid") == 0 || matches(*argv, "flowid") == 0) { - unsigned int handle; + unsigned int classid; NEXT_ARG(); - if (get_tc_classid(&handle, *argv)) { + if (get_tc_classid(&classid, *argv)) { fprintf(stderr, "Illegal \"classid\"\n"); return -1; } - addattr32(n, MAX_MSG, TCA_BPF_CLASSID, handle); + addattr32(n, MAX_MSG, TCA_BPF_CLASSID, classid); } else if (matches(*argv, "direct-action") == 0 || matches(*argv, "da") == 0) { bpf_flags |= TCA_BPF_FLAG_ACT_DIRECT; diff --git a/tc/f_flower.c b/tc/f_flower.c index 805ca6718..622ec321f 100644 --- a/tc/f_flower.c +++ b/tc/f_flower.c @@ -1452,17 +1452,17 @@ static int flower_parse_opt(struct filter_util *qu, char *handle, while (argc > 0) { if (matches(*argv, "classid") == 0 || matches(*argv, "flowid") == 0) { - unsigned int handle; + unsigned int classid; NEXT_ARG(); - ret = get_tc_classid(&handle, *argv); + ret = get_tc_classid(&classid, *argv); if (ret) { fprintf(stderr, "Illegal \"classid\"\n"); return -1; } - addattr_l(n, MAX_MSG, TCA_FLOWER_CLASSID, &handle, 4); + addattr_l(n, MAX_MSG, TCA_FLOWER_CLASSID, &classid, 4); } else if (matches(*argv, "hw_tc") == 0) { - unsigned int handle; + unsigned int classid; __u32 tc; char *end; @@ -1476,10 +1476,10 @@ static int flower_parse_opt(struct filter_util *qu, char *handle, fprintf(stderr, "TC index exceeds max range\n"); return -1; } - handle = TC_H_MAKE(TC_H_MAJ(t->tcm_parent), + classid = TC_H_MAKE(TC_H_MAJ(t->tcm_parent), TC_H_MIN(tc + TC_H_MIN_PRIORITY)); - addattr_l(n, MAX_MSG, TCA_FLOWER_CLASSID, &handle, - sizeof(handle)); + addattr_l(n, MAX_MSG, TCA_FLOWER_CLASSID, &classid, + sizeof(classid)); } else if (matches(*argv, "ip_flags") == 0) { NEXT_ARG(); ret = flower_parse_matching_flags(*argv, @@ -70,14 +70,14 @@ static int fw_parse_opt(struct filter_util *qu, char *handle, int argc, char **a while (argc > 0) { if (matches(*argv, "classid") == 0 || matches(*argv, "flowid") == 0) { - unsigned int handle; + unsigned int classid; NEXT_ARG(); - if (get_tc_classid(&handle, *argv)) { + if (get_tc_classid(&classid, *argv)) { fprintf(stderr, "Illegal \"classid\"\n"); return -1; } - addattr_l(n, 4096, TCA_FW_CLASSID, &handle, 4); + addattr_l(n, 4096, TCA_FW_CLASSID, &classid, 4); } else if (matches(*argv, "police") == 0) { NEXT_ARG(); if (parse_police(&argc, &argv, TCA_FW_POLICE, n)) { diff --git a/tc/f_matchall.c b/tc/f_matchall.c index 253ed5ce4..231d749e1 100644 --- a/tc/f_matchall.c +++ b/tc/f_matchall.c @@ -63,14 +63,14 @@ static int matchall_parse_opt(struct filter_util *qu, char *handle, while (argc > 0) { if (matches(*argv, "classid") == 0 || strcmp(*argv, "flowid") == 0) { - unsigned int handle; + unsigned int classid; NEXT_ARG(); - if (get_tc_classid(&handle, *argv)) { + if (get_tc_classid(&classid, *argv)) { fprintf(stderr, "Illegal \"classid\"\n"); return -1; } - addattr_l(n, MAX_MSG, TCA_MATCHALL_CLASSID, &handle, 4); + addattr_l(n, MAX_MSG, TCA_MATCHALL_CLASSID, &classid, 4); } else if (matches(*argv, "action") == 0) { NEXT_ARG(); if (parse_action(&argc, &argv, TCA_MATCHALL_ACT, n)) { diff --git a/tc/f_route.c b/tc/f_route.c index 31fa96a05..ad516b382 100644 --- a/tc/f_route.c +++ b/tc/f_route.c @@ -91,14 +91,14 @@ static int route_parse_opt(struct filter_util *qu, char *handle, int argc, char fh |= (0x8000|id)<<16; } else if (matches(*argv, "classid") == 0 || strcmp(*argv, "flowid") == 0) { - unsigned int handle; + unsigned int classid; NEXT_ARG(); - if (get_tc_classid(&handle, *argv)) { + if (get_tc_classid(&classid, *argv)) { fprintf(stderr, "Illegal \"classid\"\n"); return -1; } - addattr_l(n, 4096, TCA_ROUTE4_CLASSID, &handle, 4); + addattr_l(n, 4096, TCA_ROUTE4_CLASSID, &classid, 4); } else if (matches(*argv, "police") == 0) { NEXT_ARG(); if (parse_police(&argc, &argv, TCA_ROUTE4_POLICE, n)) { diff --git a/tc/f_rsvp.c b/tc/f_rsvp.c index 388e9ee59..0211c3f5e 100644 --- a/tc/f_rsvp.c +++ b/tc/f_rsvp.c @@ -230,14 +230,14 @@ static int rsvp_parse_opt(struct filter_util *qu, char *handle, int argc, pinfo_ok++; } else if (matches(*argv, "classid") == 0 || strcmp(*argv, "flowid") == 0) { - unsigned int handle; + unsigned int classid; NEXT_ARG(); - if (get_tc_classid(&handle, *argv)) { + if (get_tc_classid(&classid, *argv)) { fprintf(stderr, "Illegal \"classid\"\n"); return -1; } - addattr_l(n, 4096, TCA_RSVP_CLASSID, &handle, 4); + addattr_l(n, 4096, TCA_RSVP_CLASSID, &classid, 4); } else if (strcmp(*argv, "tunnelid") == 0) { unsigned int tid; |