From cffeeb39466bdfcead182138e1f4c6881384ab16 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Sat, 12 Jan 2019 12:28:54 +0000 Subject: [PATCH 1/6] man: ss.8: more line breaks groff stiff complains about unbreakable lines: 96: warning [p 2, 3.0i]: can't break line Indent it some more. Fixes: 7f5047524c99 ("man: ss.8: break and indent long line") Signed-off-by: Luca Boccassi Signed-off-by: Stephen Hemminger --- man/man8/ss.8 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/man/man8/ss.8 b/man/man8/ss.8 index f138c91a..553a6cf4 100644 --- a/man/man8/ss.8 +++ b/man/man8/ss.8 @@ -89,11 +89,17 @@ an uuid of the socket Show socket memory usage. The output format is: .RS .P -skmem:(r,rb,t,tb,f, +skmem:(r,rb,t,tb, .br .RS .RS -w,o,bl) +f,w, +.RE +.RE +.br +.RS +.RS +o,bl) .RE .RE .P From 8242808ced032d56d690ae66a93fa52e8d0ada9a Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Sat, 12 Jan 2019 12:28:55 +0000 Subject: [PATCH 2/6] man: tc-taprio.8: fix syntax error .Q does not exist so groff complains and the "queues" word is actually not displayed. Fixes: 579acb4bc52f ("taprio: Add manpage for tc-taprio(8)") Signed-off-by: Luca Boccassi Signed-off-by: Stephen Hemminger --- man/man8/tc-taprio.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/man8/tc-taprio.8 b/man/man8/tc-taprio.8 index 92055b43..850be9b0 100644 --- a/man/man8/tc-taprio.8 +++ b/man/man8/tc-taprio.8 @@ -45,7 +45,7 @@ How traffic is mapped to different hardware queues is similar to and so the .B map and -.Q queues +.B queues parameters have the same meaning. The other parameters specify the schedule, and at what point in time From 0cf061183ea8df2588f098554b3087bafccb0cb4 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Sat, 12 Jan 2019 12:28:56 +0000 Subject: [PATCH 3/6] Makefile: check manpages for syntax errors Pass the same parameters Lintian uses in Debian. $ make check <...> Checking manpages for syntax errors... :48: warning: macro `Q' not defined Error in tc-taprio.8 Makefile:27: recipe for target 'check' failed Signed-off-by: Luca Boccassi Signed-off-by: Stephen Hemminger --- Makefile | 6 ++++++ man/Makefile | 9 +++++++-- man/man3/Makefile | 6 +++++- man/man7/Makefile | 6 +++++- man/man8/Makefile | 6 +++++- 5 files changed, 28 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index a513cf38..48f469b0 100644 --- a/Makefile +++ b/Makefile @@ -115,6 +115,12 @@ distclean: clobber check: all cd testsuite && $(MAKE) && $(MAKE) alltests + @if command -v man >/dev/null 2>&1; then \ + echo "Checking manpages for syntax errors..."; \ + $(MAKE) -C man check; \ + else \ + echo "man not installed, skipping checks for syntax errors."; \ + fi cscope: cscope -b -q -R -Iinclude -sip -slib -smisc -snetem -stc diff --git a/man/Makefile b/man/Makefile index 6b095ee4..0c759dd2 100644 --- a/man/Makefile +++ b/man/Makefile @@ -2,14 +2,19 @@ INSTALL=install INSTALLDIR=install -m 0755 -d INSTALLMAN=install -m 0644 +# Pass the same parameters as Lintian uses on Debian. +MAN_CHECK=LC_ALL=en_US.UTF-8 MANROFFSEQ='' MANWIDTH=80 man --warnings \ + --encoding=UTF-8 --local-file --troff-device=utf8 --ditroff +# Hide man output, count and print errors. +MAN_REDIRECT=2>&1 >/dev/null | tee /dev/fd/2 | wc -l SUBDIRS = man3 man7 man8 -all clean install: +all clean install check: @for subdir in $(SUBDIRS); do $(MAKE) -C $$subdir $@ || exit $$?; done distclean: clean -.PHONY: install clean distclean +.PHONY: install clean distclean check .EXPORT_ALL_VARIABLES: diff --git a/man/man3/Makefile b/man/man3/Makefile index e3d3e607..1732be26 100644 --- a/man/man3/Makefile +++ b/man/man3/Makefile @@ -11,4 +11,8 @@ install: $(INSTALLDIR) $(DESTDIR)$(MANDIR)/man3 $(INSTALLMAN) $(MAN3PAGES) $(DESTDIR)$(MANDIR)/man3 -.PHONY: install clean distclean +check: + @for page in $(MAN3PAGES); do test 0 -eq $$($(MAN_CHECK) $$page \ + $(MAN_REDIRECT)) || { echo "Error in $$page"; exit 1; }; done + +.PHONY: install clean distclean check diff --git a/man/man7/Makefile b/man/man7/Makefile index 1a8d5219..c0e545a1 100644 --- a/man/man7/Makefile +++ b/man/man7/Makefile @@ -11,4 +11,8 @@ install: $(INSTALLDIR) $(DESTDIR)$(MANDIR)/man7 $(INSTALLMAN) $(MAN7PAGES) $(DESTDIR)$(MANDIR)/man7 -.PHONY: install clean distclean +check: + @for page in $(MAN7PAGES); do test 0 -eq $$($(MAN_CHECK) $$page \ + $(MAN_REDIRECT)) || { echo "Error in $$page"; exit 1; }; done + +.PHONY: install clean distclean check diff --git a/man/man8/Makefile b/man/man8/Makefile index 932ba1f3..0269e174 100644 --- a/man/man8/Makefile +++ b/man/man8/Makefile @@ -23,4 +23,8 @@ install: $(INSTALLDIR) $(DESTDIR)$(MANDIR)/man8 $(INSTALLMAN) $(MAN8PAGES) $(DESTDIR)$(MANDIR)/man8 -.PHONY: install clean distclean +check: all + @for page in $(MAN8PAGES); do test 0 -eq $$($(MAN_CHECK) $$page \ + $(MAN_REDIRECT)) || { echo "Error in $$page"; exit 1; }; done + +.PHONY: install clean distclean check From 3bc2dc76686681bac00a5301c78438f796139301 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 22 Jan 2019 16:03:31 +1300 Subject: [PATCH 4/6] uapi: in.h change Signed-off-by: Stephen Hemminger --- include/uapi/linux/in.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/in.h b/include/uapi/linux/in.h index 92242d20..1d30d797 100644 --- a/include/uapi/linux/in.h +++ b/include/uapi/linux/in.h @@ -268,7 +268,7 @@ struct sockaddr_in { #define IN_MULTICAST(a) IN_CLASSD(a) #define IN_MULTICAST_NET 0xe0000000 -#define IN_BADCLASS(a) ((((long int) (a) ) == 0xffffffff) +#define IN_BADCLASS(a) (((long int) (a) ) == (long int)0xffffffff) #define IN_EXPERIMENTAL(a) IN_BADCLASS((a)) #define IN_CLASSE(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000) From dc0332b1e8e4ab8771562128993d512986f856e2 Mon Sep 17 00:00:00 2001 From: Adi Nissim Date: Thu, 10 Jan 2019 15:03:50 +0200 Subject: [PATCH 5/6] tc: m_tunnel_key: Allow key-less tunnels Change the id parameter of the tunnel_key set action from mandatory to optional. Some tunneling protocols (e.g. GRE) specify the id as an optional field. Signed-off-by: Adi Nissim Signed-off-by: Stephen Hemminger --- man/man8/tc-tunnel_key.8 | 4 ++-- tc/m_tunnel_key.c | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/man/man8/tc-tunnel_key.8 b/man/man8/tc-tunnel_key.8 index dc8421b4..2145eb62 100644 --- a/man/man8/tc-tunnel_key.8 +++ b/man/man8/tc-tunnel_key.8 @@ -59,12 +59,12 @@ above). .TP .B set Set tunnel metadata to be used by the IP tunnel device. Requires -.B id -, .B src_ip and .B dst_ip options. +.B id +, .B dst_port and .B geneve_opts diff --git a/tc/m_tunnel_key.c b/tc/m_tunnel_key.c index e9e71e41..9449287e 100644 --- a/tc/m_tunnel_key.c +++ b/tc/m_tunnel_key.c @@ -25,7 +25,7 @@ static void explain(void) fprintf(stderr, " tunnel_key set \n"); fprintf(stderr, "Where TUNNEL_KEY is a combination of:\n" - "id (mandatory)\n" + "id \n" "src_ip (mandatory)\n" "dst_ip (mandatory)\n" "dst_port \n" @@ -217,7 +217,6 @@ static int parse_tunnel_key(struct action_util *a, int *argc_p, char ***argv_p, int ret; int has_src_ip = 0; int has_dst_ip = 0; - int has_key_id = 0; int csum = 1; if (matches(*argv, "tunnel_key") != 0) @@ -273,7 +272,6 @@ static int parse_tunnel_key(struct action_util *a, int *argc_p, char ***argv_p, fprintf(stderr, "Illegal \"id\"\n"); return -1; } - has_key_id = 1; } else if (matches(*argv, "dst_port") == 0) { NEXT_ARG(); ret = tunnel_key_parse_dst_port(*argv, @@ -335,7 +333,7 @@ static int parse_tunnel_key(struct action_util *a, int *argc_p, char ***argv_p, } if (action == TCA_TUNNEL_KEY_ACT_SET && - (!has_src_ip || !has_dst_ip || !has_key_id)) { + (!has_src_ip || !has_dst_ip)) { fprintf(stderr, "set needs tunnel_key parameters\n"); explain(); return -1; From 8513f4a92657c0418043dafd9efdaa047b7f7132 Mon Sep 17 00:00:00 2001 From: Jakub Kicinski Date: Sat, 12 Jan 2019 12:54:06 -0800 Subject: [PATCH 6/6] ip route: get: only set RTM_F_LOOKUP_TABLE flag for IPv4 Kernel ignores the RTM_F_LOOKUP_TABLE flag for all families but IPv4. Don't set it, otherwise it may fall foul of strict checking policies. Signed-off-by: Jakub Kicinski Signed-off-by: Stephen Hemminger --- ip/iproute.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ip/iproute.c b/ip/iproute.c index 0440366e..5f58a3b3 100644 --- a/ip/iproute.c +++ b/ip/iproute.c @@ -2068,7 +2068,9 @@ static int iproute_get(int argc, char **argv) if (req.r.rtm_family == AF_UNSPEC) req.r.rtm_family = AF_INET; - req.r.rtm_flags |= RTM_F_LOOKUP_TABLE; + /* Only IPv4 supports the RTM_F_LOOKUP_TABLE flag */ + if (req.r.rtm_family == AF_INET) + req.r.rtm_flags |= RTM_F_LOOKUP_TABLE; if (fib_match) req.r.rtm_flags |= RTM_F_FIB_MATCH;