From aba44dc2eaf035387b979b7f4acba67fada844a4 Mon Sep 17 00:00:00 2001 From: Roman Mashak Date: Tue, 1 Sep 2020 15:46:12 -0400 Subject: [PATCH 1/6] ip: updated ip-link man page Added description of link flags allmulticast, promisc and trailers. Signed-off-by: Roman Mashak Signed-off-by: Stephen Hemminger --- man/man8/ip-link.8.in | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in index 367105b7..f451ecf3 100644 --- a/man/man8/ip-link.8.in +++ b/man/man8/ip-link.8.in @@ -1916,6 +1916,28 @@ change the .B MULTICAST flag on the device. +.TP +.BR "allmulticast on " or " allmulticast off" +change the +.B ALLMULTI +flag on the device. When enabled, instructs network driver to retrieve all +multicast packets from the network to the kernel for further processing. + +.TP +.BR "promisc on " or " promisc off" +change the +.B PROMISC +flag on the device. When enabled, activates promiscuous operation of the +network device. + +.TP +.BR "trailers on " or " trailers off" +change the +.B NOTRAILERS +flag on the device, +.B NOT +used by the Linux and exists for BSD compatibility. + .TP .BR "protodown on " or " protodown off" change the From fece144abcc3c11eb97e32076aa66d782de3756f Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 28 Sep 2020 21:08:01 +0200 Subject: [PATCH 2/6] build: avoid make jobserver warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I observe: ยป make -j8 CCOPTS=-ggdb3 lib make[1]: warning: -j8 forced in submake: resetting jobserver mode. make[1]: Nothing to be done for 'all'. ip make[1]: warning: -j8 forced in submake: resetting jobserver mode. CC ipntable.o MFLAGS is a historic variable of some kind; removing it fixes the jobserver issue. Signed-off-by: Jan Engelhardt Signed-off-by: Stephen Hemminger --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index cadda235..5b040415 100644 --- a/Makefile +++ b/Makefile @@ -63,7 +63,7 @@ LDLIBS += $(LIBNETLINK) all: config.mk @set -e; \ for i in $(SUBDIRS); \ - do echo; echo $$i; $(MAKE) $(MFLAGS) -C $$i; done + do echo; echo $$i; $(MAKE) -C $$i; done .PHONY: clean clobber distclean check cscope version @@ -101,11 +101,11 @@ version: clean: @for i in $(SUBDIRS) testsuite; \ - do $(MAKE) $(MFLAGS) -C $$i clean; done + do $(MAKE) -C $$i clean; done clobber: touch config.mk - $(MAKE) $(MFLAGS) clean + $(MAKE) clean rm -f config.mk cscope.* distclean: clobber From 03fb6fa1d8fee869fea8ff4519d6d15cb5e256c7 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 28 Sep 2020 13:50:36 -0700 Subject: [PATCH 3/6] uapi: update headers from 5.9-rc7 Signed-off-by: Stephen Hemminger --- include/uapi/linux/bpf.h | 10 +++++----- include/uapi/linux/in.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index faf7df1d..b21cc6af 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h @@ -767,7 +767,7 @@ union bpf_attr { * * Also, note that **bpf_trace_printk**\ () is slow, and should * only be used for debugging purposes. For this reason, a notice - * bloc (spanning several lines) is printed to kernel logs and + * block (spanning several lines) is printed to kernel logs and * states that the helper should not be used "for production use" * the first time this helper is used (or more precisely, when * **trace_printk**\ () buffers are allocated). For passing values @@ -1033,14 +1033,14 @@ union bpf_attr { * * int ret; * struct bpf_tunnel_key key = {}; - * + * * ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0); * if (ret < 0) * return TC_ACT_SHOT; // drop packet - * + * * if (key.remote_ipv4 != 0x0a000001) * return TC_ACT_SHOT; // drop packet - * + * * return TC_ACT_OK; // accept packet * * This interface can also be used with all encapsulation devices @@ -1147,7 +1147,7 @@ union bpf_attr { * Description * Retrieve the realm or the route, that is to say the * **tclassid** field of the destination for the *skb*. The - * indentifier retrieved is a user-provided tag, similar to the + * identifier retrieved is a user-provided tag, similar to the * one used with the net_cls cgroup (see description for * **bpf_get_cgroup_classid**\ () helper), but here this tag is * held by a route (a destination entry), not by a task. diff --git a/include/uapi/linux/in.h b/include/uapi/linux/in.h index 0f68bcff..32cf55c8 100644 --- a/include/uapi/linux/in.h +++ b/include/uapi/linux/in.h @@ -135,7 +135,7 @@ struct in_addr { * this socket to prevent accepting spoofed ones. */ #define IP_PMTUDISC_INTERFACE 4 -/* weaker version of IP_PMTUDISC_INTERFACE, which allos packets to get +/* weaker version of IP_PMTUDISC_INTERFACE, which allows packets to get * fragmented if they exeed the interface mtu */ #define IP_PMTUDISC_OMIT 5 From 10414de9e60721ff1c765e0cb8196b8b1fde40ac Mon Sep 17 00:00:00 2001 From: Kamal Heib Date: Sun, 27 Sep 2020 15:06:56 +0300 Subject: [PATCH 4/6] ip: iplink_ipoib.c: Remove extra spaces Remove the extra space between the reported ipoib attrs - use only one space instead of two. Fixes: de0389935f8c ("iplink: Added support for the kernel IPoIB RTNL ops") Signed-off-by: Kamal Heib Signed-off-by: Stephen Hemminger --- ip/iplink_ipoib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ip/iplink_ipoib.c b/ip/iplink_ipoib.c index 05dba350..b730c533 100644 --- a/ip/iplink_ipoib.c +++ b/ip/iplink_ipoib.c @@ -99,7 +99,7 @@ static void ipoib_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[]) snprintf(b1, sizeof(b1), "%#.4x", pkey); print_string(PRINT_JSON, "key", NULL, b1); } else { - fprintf(f, "pkey %#.4x ", pkey); + fprintf(f, "pkey %#.4x ", pkey); } if (!tb[IFLA_IPOIB_MODE] || @@ -112,7 +112,7 @@ static void ipoib_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[]) mode == IPOIB_MODE_DATAGRAM ? "datagram" : mode == IPOIB_MODE_CONNECTED ? "connected" : "unknown"; - print_string(PRINT_ANY, "mode", "mode %s ", mode_str); + print_string(PRINT_ANY, "mode", "mode %s ", mode_str); if (!tb[IFLA_IPOIB_UMCAST] || RTA_PAYLOAD(tb[IFLA_IPOIB_UMCAST]) < sizeof(__u16)) @@ -126,7 +126,7 @@ static void ipoib_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[]) snprintf(b1, sizeof(b1), "%.4x", umcast); print_string(PRINT_JSON, "umcast", NULL, b1); } else { - fprintf(f, "umcast %.4x ", umcast); + fprintf(f, "umcast %.4x ", umcast); } } From e410c963e398e4a83c113af9ce74b65f8afc306f Mon Sep 17 00:00:00 2001 From: Eyal Birger Date: Fri, 2 Oct 2020 12:34:28 +0300 Subject: [PATCH 5/6] ipntable: add missing ndts_table_fulls ntable stat Used for tracking neighbour table overflows. Signed-off-by: Eyal Birger Signed-off-by: Stephen Hemminger --- ip/ipntable.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ip/ipntable.c b/ip/ipntable.c index ddee4905..b5b06a3b 100644 --- a/ip/ipntable.c +++ b/ip/ipntable.c @@ -517,6 +517,11 @@ static void print_ndtstats(const struct ndt_stats *ndts) print_u64(PRINT_ANY, "forced_gc_runs", "forced_gc_runs %llu ", ndts->ndts_forced_gc_runs); + print_string(PRINT_FP, NULL, "%s ", _SL_); + + print_u64(PRINT_ANY, "table_fulls", "table_fulls %llu ", + ndts->ndts_table_fulls); + print_nl(); } From be1bea843234878a936fdf854e511053d528bf75 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 6 Oct 2020 15:15:56 -0700 Subject: [PATCH 6/6] addr: Fix noprefixroute and autojoin for IPv4 These were reported as IPv6-only and ignored: # ip address add 192.0.2.2/24 dev dummy5 noprefixroute Warning: noprefixroute option can be set only for IPv6 addresses # ip address add 224.1.1.10/24 dev dummy5 autojoin Warning: autojoin option can be set only for IPv6 addresses This enables them back for IPv4. Fixes: 9d59c86e575b5 ("iproute2: ip addr: Organize flag properties structurally") Signed-off-by: Adel Belhouane Signed-off-by: Stephen Hemminger --- ip/ipaddress.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ip/ipaddress.c b/ip/ipaddress.c index ccf67d1d..2b4cb48a 100644 --- a/ip/ipaddress.c +++ b/ip/ipaddress.c @@ -1249,8 +1249,8 @@ static const struct ifa_flag_data_t { { .name = "tentative", .mask = IFA_F_TENTATIVE, .readonly = true, .v6only = true}, { .name = "permanent", .mask = IFA_F_PERMANENT, .readonly = true, .v6only = true}, { .name = "mngtmpaddr", .mask = IFA_F_MANAGETEMPADDR, .readonly = false, .v6only = true}, - { .name = "noprefixroute", .mask = IFA_F_NOPREFIXROUTE, .readonly = false, .v6only = true}, - { .name = "autojoin", .mask = IFA_F_MCAUTOJOIN, .readonly = false, .v6only = true}, + { .name = "noprefixroute", .mask = IFA_F_NOPREFIXROUTE, .readonly = false, .v6only = false}, + { .name = "autojoin", .mask = IFA_F_MCAUTOJOIN, .readonly = false, .v6only = false}, { .name = "stable-privacy", .mask = IFA_F_STABLE_PRIVACY, .readonly = true, .v6only = true}, };