Merge 'iproute2-master' into iproute2-next
Signed-off-by: David Ahern <dsahern@gmail.com>
This commit is contained in:
commit
b45664e064
6
Makefile
6
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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -89,11 +89,17 @@ an uuid of the socket
|
|||
Show socket memory usage. The output format is:
|
||||
.RS
|
||||
.P
|
||||
skmem:(r<rmem_alloc>,rb<rcv_buf>,t<wmem_alloc>,tb<snd_buf>,f<fwd_alloc>,
|
||||
skmem:(r<rmem_alloc>,rb<rcv_buf>,t<wmem_alloc>,tb<snd_buf>,
|
||||
.br
|
||||
.RS
|
||||
.RS
|
||||
w<wmem_queued>,o<opt_mem>,bl<back_log>)
|
||||
f<fwd_alloc>,w<wmem_queued>,
|
||||
.RE
|
||||
.RE
|
||||
.br
|
||||
.RS
|
||||
.RS
|
||||
o<opt_mem>,bl<back_log>)
|
||||
.RE
|
||||
.RE
|
||||
.P
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ static void explain(void)
|
|||
fprintf(stderr, " tunnel_key set <TUNNEL_KEY>\n");
|
||||
fprintf(stderr,
|
||||
"Where TUNNEL_KEY is a combination of:\n"
|
||||
"id <TUNNELID> (mandatory)\n"
|
||||
"id <TUNNELID>\n"
|
||||
"src_ip <IP> (mandatory)\n"
|
||||
"dst_ip <IP> (mandatory)\n"
|
||||
"dst_port <UDP_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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue