Commit Graph

6651 Commits

Author SHA1 Message Date
Stephen Hemminger
742fb8a25c v6.12.0 2024-11-19 08:57:22 -08:00
Denis Kirjanov
225f74761b lib: names: check calloc return value in db_names_alloc
db_names_load() may crash since it touches the
hash member. Fix it by checking the return value

Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-11-17 10:11:58 -08:00
Nikolay Aleksandrov
929b29f011 bridge: add ip/iplink_bridge files to MAINTAINERS
Add F line for the ip/iplink_bridge* files to bridge's MAINTAINERS
entry.

Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-11-17 10:11:55 -08:00
Denis Kirjanov
d7d395ebb2 lib: utils: close file handle on error
reap_prop() doesn't close the file descriptor
on some errors, fix it.

Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-11-17 10:11:52 -08:00
Stephen Hemminger
d092468f11 uapi: update to bpf.h
Stay insync with upstream

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-10-29 21:33:41 -07:00
Stephen Hemminger
5498aeb947 uapi: update of bpf.h
Update from 6.12-rc4

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-10-21 10:22:11 -07:00
Xiao Liang
a597ab156b iplink: Fix link-netns id and link ifindex
When link-netns or link-netnsid is supplied, lookup link in that netns.
And if both netns and link-netns are given, IFLA_LINK_NETNSID should be
the nsid of link-netns from the view of target netns, not from current
one.

For example, when handling:

    # ip -n ns1 link add netns ns2 link-netns ns3 link eth1 eth1.100 type vlan id 100

should lookup eth1 in ns3 and IFLA_LINK_NETNSID is the id of ns3 from
ns2.

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-10-17 12:09:44 -07:00
Xiao Liang
18bbd74b34 ip: Move of set_netnsid_from_name() to namespace.c
Move set_netnsid_from_name() outside for reuse, like what's done for
netns_id_from_name().

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-10-17 12:08:08 -07:00
wenglianfa
bea332466d rdma: Fix help information of 'rdma resource'
'rdma resource show cq' supports object 'dev' but not 'link', and
doesn't support device name with port.

Fixes: b0b8e32cbf ("rdma: Add CQ resource tracking information")
Signed-off-by: wenglianfa <wenglianfa@huawei.com>
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-10-17 12:07:24 -07:00
Jakub Kicinski
6887a0656d ip: netconf: fix overzealous error checking
The rtnetlink.sh kernel test started reporting errors after
iproute2 update. The error checking introduced by commit
under fixes is incorrect. rtnl_listen() always returns
an error, because the only way to break the loop is to
return an error from the handler, it seems.

Switch this code to using normal rtnl_talk(), instead of
the rtnl_listen() abuse. As far as I can tell the use of
rtnl_listen() was to make get and dump use common handling
but that's no longer the case, anyway.

Before:
  $ ip -6 netconf show dev lo
  inet6 lo forwarding off mc_forwarding off proxy_neigh off ignore_routes_with_linkdown off
  $ echo $?
  2

After:
  $ ./ip/ip -6 netconf show dev lo
inet6 lo forwarding off mc_forwarding off proxy_neigh off ignore_routes_with_linkdown off
  $ echo $?
  0

Fixes: 00e8a64dac ("ip: detect errors in netconf monitor mode")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-10-11 10:35:58 -07:00
Hangbin Liu
f305296e40 ip/ipmroute: use preferred_family to get prefix
The mroute family is reset to RTNL_FAMILY_IPMR or RTNL_FAMILY_IP6MR when
retrieving the multicast routing cache. However, the get_prefix() and
subsequently __get_addr_1() cannot identify these families. Using
preferred_family to obtain the prefix can resolve this issue.

Fixes: 98ce99273f ("mroute: fix up family handling")
Reported-by: Jianlin Shi <jishi@redhat.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-10-10 09:52:49 -07:00
Stephen Hemminger
95f4021b48 netem: swap transposed calloc args
Gcc with -Wextra complains about transposed args to calloc
in netem.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-10-07 09:37:24 -07:00
Stephen Hemminger
f4b86f752d bridge: catch invalid stp state
The stp state parsing was putting result in an __u8 which
would mean that check for invalid string was never happening.

Caught by enabling -Wextra:
    CC       mst.o
mst.c: In function ‘mst_set’:
mst.c:217:27: warning: comparison is always false due to limited range of data type [-Wtype-limits]
  217 |                 if (state == -1) {

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-10-07 09:33:48 -07:00
Stephen Hemminger
b32ac38cc4 uapi: update headers
Current headers from 6.12-rc1

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-10-05 09:05:28 -07:00
Nicolas Dichtel
57daf8ff8c iplink: fix fd leak when playing with netns
The command 'ip link set foo netns mynetns' opens a file descriptor to fill
the netlink attribute IFLA_NET_NS_FD. This file descriptor is never closed.
When batch mode is used, the number of file descriptor may grow greatly and
reach the maximum file descriptor number that can be opened.

This fd can be closed only after the netlink answer. Moreover, a second
fd could be opened because some (struct link_util)->parse_opt() handlers
call iplink_parse().

Let's add a helper to manage these fds:
 - open_fds_add() stores a fd, up to 5 (arbitrary choice, it seems enough);
 - open_fds_close() closes all stored fds.

Fixes: 0dc34c7713 ("iproute2: Add processless network namespace support")
Reported-by: Alexandre Ferrieux <alexandre.ferrieux@orange.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-09-28 09:24:56 -07:00
Dario Binacchi
9c9824bcaf arpd: use designated initializers for msghdr structure
This patch fixes the following error:

arpd.c:442:17: error: initialization of 'int' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
  442 |                 NULL,   0,

raised by Buildroot autobuilder [1].

In the case in question, the analysis of socket.h [2] containing the
msghdr structure shows that it has been modified with the addition of
padding fields, which cause the compilation error. The use of designated
initializers allows the issue to be fixed.

struct msghdr {
	void *msg_name;
	socklen_t msg_namelen;
	struct iovec *msg_iov;
	int __pad1;
	int msg_iovlen;
	int __pad1;
	void *msg_control;
	int __pad2;
	socklen_t msg_controllen;
	int __pad2;
	int msg_flags;
};

[1] http://autobuild.buildroot.org/results/e4cdfa38ae9578992f1c0ff5c4edae3cc0836e3c/
[2] iproute2/host/mips64-buildroot-linux-musl/sysroot/usr/include/sys/socket.h

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-09-28 09:23:35 -07:00
Dario Binacchi
043ef90e2f bridge: mst: fix a further musl build issue
This patch fixes the following build errors:

In file included from mst.c:11:
../include/json_print.h:80:30: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration
   80 | _PRINT_FUNC(tv, const struct timeval *)
      |                              ^~~~~~~
../include/json_print.h:50:37: note: in definition of macro '_PRINT_FUNC'
   50 |                                     type value);                        \
      |                                     ^~~~
../include/json_print.h:80:30: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration
   80 | _PRINT_FUNC(tv, const struct timeval *)
      |                              ^~~~~~~
../include/json_print.h:55:45: note: in definition of macro '_PRINT_FUNC'
   55 |                                             type value)                 \
      |                                             ^~~~
../include/json_print.h: In function 'print_tv':
../include/json_print.h:58:48: error: passing argument 5 of 'print_color_tv' from incompatible pointer type [-Wincompatible-pointer-types]
   58 |                                                value);                  \
      |                                                ^~~~~
      |                                                |
      |                                                const struct timeval *
../include/json_print.h:80:1: note: in expansion of macro '_PRINT_FUNC'
   80 | _PRINT_FUNC(tv, const struct timeval *)
      | ^~~~~~~~~~~
../include/json_print.h:50:42: note: expected 'const struct timeval *' but argument is of type 'const struct timeval *'
   50 |                                     type value);                        \
      |                                          ^
../include/json_print.h:80:1: note: in expansion of macro '_PRINT_FUNC'
   80 | _PRINT_FUNC(tv, const struct timeval *)

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-09-27 14:11:38 -07:00
Dario Binacchi
6a77abab92 bridge: mst: fix a musl build issue
This patch fixes a compilation error raised by the bump to version 6.11.0
in Buildroot using musl as the C library for the cross-compilation
toolchain.

After setting the CFLGAS

ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
IPROUTE2_CFLAGS += -D__UAPI_DEF_IN6_ADDR=0 -D__UAPI_DEF_SOCKADDR_IN6=0 \
			-D__UAPI_DEF_IPV6_MREQ=0
endif

to fix the following errors:

In file included from ../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/arpa/inet.h:9,
                 from ../include/libnetlink.h:14,
                 from mst.c:10:
../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:23:8: error: redefinition of 'struct in6_addr'
   23 | struct in6_addr {
      |        ^~~~~~~~
In file included from ../include/uapi/linux/if_bridge.h:19,
                 from mst.c:7:
../include/uapi/linux/in6.h:33:8: note: originally defined here
   33 | struct in6_addr {
      |        ^~~~~~~~
../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:34:8: error: redefinition of 'struct sockaddr_in6'
   34 | struct sockaddr_in6 {
      |        ^~~~~~~~~~~~
../include/uapi/linux/in6.h:50:8: note: originally defined here
   50 | struct sockaddr_in6 {
      |        ^~~~~~~~~~~~
../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:42:8: error: redefinition of 'struct ipv6_mreq'
   42 | struct ipv6_mreq {
      |        ^~~~~~~~~
../include/uapi/linux/in6.h:60:8: note: originally defined here
   60 | struct ipv6_mreq {

I got this further errors

../include/uapi/linux/in6.h:72:25: error: field 'flr_dst' has incomplete type
   72 |         struct in6_addr flr_dst;
      |                         ^~~~~~~
../include/uapi/linux/if_bridge.h:711:41: error: field 'ip6' has incomplete type
  711 |                         struct in6_addr ip6;
      |                                         ^~~

fixed by including the netinet/in.h header.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-09-27 14:11:38 -07:00
Stephen Hemminger
8b9d9ea427 Merge ssh://gitolite.kernel.org/pub/scm/network/iproute2/iproute2-next 2024-09-18 08:45:43 -07:00
Stephen Hemminger
b19d4d6eef v6.11.0 2024-09-15 12:42:26 -07:00
Stephen Hemminger
9ced13212c man: replace use of term whitelist
Avoid use of term whitelist because it propgates white == good
assumptions. Not really neede on the man page.
See: https://inclusivenaming.org/word-lists/tier-1/whitelist/

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-09-13 08:17:59 -07:00
Stephen Hemminger
c70ccb476d man: replace use of word segregate
The term segregate carries a lot of racist baggage in the US.
It is on the Inclusive Naming word list.
See: https://inclusivenaming.org/word-lists/tier-3/segregate/

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-09-12 10:17:58 -07:00
Stephen Hemminger
058e82cb2f replace use of term 'Sanity check'
The term "sanity check" is on the Tier2 word list (should replace).
See https://inclusivenaming.org/word-lists/tier-2/sanity-check/

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-09-12 10:12:21 -07:00
Justin Iurman
9dafac4fdd man8: ip-route: update documentation
Include "tunsrc" in the man page.

Signed-off-by: Justin Iurman <justin.iurman@uliege.be>
Signed-off-by: David Ahern <dsahern@kernel.org>
2024-09-09 15:19:39 +00:00
Justin Iurman
42ba9a6fb8 ip: lwtunnel: tunsrc support
Add support for setting/getting the new "tunsrc" feature.

Signed-off-by: Justin Iurman <justin.iurman@uliege.be>
Signed-off-by: David Ahern <dsahern@kernel.org>
2024-09-09 15:19:36 +00:00
David Ahern
1a605b72ea Update kernel headers
Update kernel headers to commit:
    bfba7bc8b7c2 ("Merge branch 'unmask-dscp-part-four'")

Signed-off-by: David Ahern <dsahern@kernel.org>
2024-09-09 15:15:51 +00:00
David Ahern
968570dfce Merge remote-tracking branch 'main/main' into next
Signed-off-by: David Ahern <dsahern@kernel.org>
2024-08-19 01:07:16 +00:00
Petr Machata
1fa8811c50 ip: nexthop: Support 16-bit nexthop weights
Two interlinked changes related to the nexthop group management have been
recently merged in kernel commit e96f6fd30eec ("Merge branch
'net-nexthop-increase-weight-to-u16'").

- One of the reserved bytes in struct nexthop_grp was redefined to carry
  high-order bits of the nexthop weight, thus allowing 16-bit nexthop
  weights.

- NHA_OP_FLAGS started getting dumped on nexthop group dump to carry a
  flag, NHA_OP_FLAG_RESP_GRP_RESVD_0, that indicates that reserved fields
  in struct nexthop_grp are zeroed before dumping.

If NHA_OP_FLAG_RESP_GRP_RESVD_0 is given, it is safe to interpret the newly
named nexthop_grp.weight_high as high-order bits of nexthop weight.

Extend ipnexthop to support configuring nexthop weights of up to 65536, and
when dumping, to interpret nexthop_grp.weight_high if safe.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2024-08-19 01:06:46 +00:00
David Ahern
a61a44b608 Update kernel headers
Update kernel headers to commit:
    a99ef548bba0 ("bnx2x: Set ivi->vlan field as an integer")

Signed-off-by: David Ahern <dsahern@kernel.org>
2024-08-19 01:04:45 +00:00
Stefan Mätje
e9096586e0 ss: fix libbpf version check for ENABLE_BPF_SKSTORAGE_SUPPORT
This patch fixes a problem with the libbpf version comparison to decide
if ENABLE_BPF_SKSTORAGE_SUPPORT could be enabled.

- The code enabled by ENABLE_BPF_SKSTORAGE_SUPPORT uses the function
  btf_dump__new with an API that was introduced in libbpf 0.6.0. So
  check now against libbpf version to be >= 0.6.x instead of 0.5.x.

- This code still depends on the necessity to have LIBBPF_MAJOR_VERSION
  and LIBBPF_MINOR_VERSION defined, even if libbpf_version.h is not
  present in the library development package. This was ensured with
  the previous patch for the configure script.

Fixes: e3ecf048 ("ss: pretty-print BPF socket-local storage")
Signed-off-by: Stefan Mätje <stefan.maetje@esd.eu>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-08-15 08:24:41 -07:00
Stefan Mätje
0ddadc93e5 configure: provide surrogates for possibly missing libbpf_version.h
Old libbpf library versions (< 0.7.x) may not have the libbpf_version.h
header packaged. This header would provide LIBBPF_MAJOR_VERSION and
LIBBPF_MINOR_VERSION which are then missing to control conditional
compilation in some source files.

Provide surrogates for these defines via CFLAGS that are derived from
the LIBBPF_VERSION determined with $(${PKG_CONFIG} libbpf --modversion).

Signed-off-by: Stefan Mätje <stefan.maetje@esd.eu>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-08-15 08:24:37 -07:00
Lương Việt Hoàng
72c13bc5d4 tc-cake: reformat
Reformat tc-cake to use man format (nroff) instead of pre-formatting.

Signed-off-by: Lương Việt Hoàng <tcm4095@gmail.com>
Acked-by: Toke Høiland-Jørgensen <toke@kernel.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-08-15 08:16:07 -07:00
Lương Việt Hoàng
f7c2153058 tc-cake: document 'ingress'
Linux kernel commit 7298de9cd7255a783ba ("sch_cake: Add ingress mode") added
an ingress mode for CAKE, which can be enabled with the 'ingress' parameter.
Document the changes in CAKE's behavior when ingress mode is enabled.

Signed-off-by: Lương Việt Hoàng <tcm4095@gmail.com>
Reviewed-by: Toke Høiland-Jørgensen <toke@kernel.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-08-15 08:16:07 -07:00
Stephen Hemminger
6e4c3ffb82 man/tc-codel: cleanup man page
Instead of pre-formatted bullet list, use the man macros.
Make sure same sentence format is used in all options.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-08-12 10:21:42 -07:00
Stephen Hemminger
6d632bbcda man/ip-xfrm: fix dangling quote
The man page had a dangling quote character in the usage text
which can confuse auto-color/format code like Emacs and Vim.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-08-12 10:21:03 -07:00
Nikolay Aleksandrov
354d8a3688 ip/netkit: print peer policy
Print also the peer policy, example:
$ ip -d l sh dev netkit0
...
 netkit mode l2 type primary policy blackhole peer policy forward
...

Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
2024-08-09 14:32:46 +00:00
Tobias Waldekranz
2cb1a656e9 bridge: Remove duplicated textification macros
include/utils.h already provides textify(), which is functionally
equivalent to __stringify().

Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2024-08-04 15:24:21 +00:00
Davide Caratti
0941975dc8 tc: f_flower: add support for matching on tunnel metadata
extend TC flower for matching on tunnel metadata.

Changes since v2:
 - split uAPI changes and TC code in separate patches, as per David's request [2]

Changes since v1:
 - fix incostintent naming in explain() and in tc-flower.8 (Asbjørn)

Changes since RFC:
 - update uAPI bits to Asbjørn's most recent code [1]
 - add 'tun' prefix to all flag names (Asbjørn)
 - allow parsing 'enc_flags' multiple times, without clearing the match
   mask every time, like happens for 'ip_flags' (Asbjørn)
 - don't use "matches()" for parsing argv[]  (Stephen)
 - (hopefully) improve usage() printout (Asbjørn)
 - update man page

[1] https://lore.kernel.org/netdev/20240709163825.1210046-1-ast@fiberby.net/
[2] https://lore.kernel.org/netdev/cc73004c-9aa8-9cd3-b46e-443c0727c34d@kernel.org/

Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2024-08-04 15:20:32 +00:00
David Ahern
049a2b5678 Merge remote-tracking branch 'main/main' into next
Signed-off-by: David Ahern <dsahern@kernel.org>
2024-08-04 15:18:51 +00:00
Matthieu Baerts (NGI0)
b176b9f403 ip: mptcp: 'id 0' is only for 'del'
Adding an endpoint with 'id 0' is not allowed. In this case, the kernel
will ignore this 'id 0' and set another one.

Similarly, because there are no endpoints with this 'id 0', changing an
attribute for such endpoint will not be possible.

To avoid some confusions, it sounds better to clearly report an error
that the ID cannot be 0 in these cases.

Acked-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-08-02 10:47:39 -07:00
Matthieu Baerts (NGI0)
8145a84273 man: mptcp: clarify the 'ID' parameter
Explain the range (u8), and the special case for ID 0.

The endpoints here are for all the connections, while the ID 0 is a
special case per connection, depending on the source address used by the
initial subflow. This ID 0 can then not be used for the global
endpoints.

Acked-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-08-02 10:47:39 -07:00
Matthieu Baerts (NGI0)
640ebc23d8 man: mptcp: 'fullmesh' has to be used with 'subflow'
'fullmesh' affects the subflow creation, it has to be used with the
'subflow' flag. That's what is enforced on the kernel side.

Acked-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-08-02 10:47:39 -07:00
Matthieu Baerts (NGI0)
e3c1e2a4e2 man: mptcp: 'backup' flag also affects outgoing data
That's the behaviour with the default packet scheduler.

In some early design, the default scheduler was supposed to take into
account only the received backup flags, but it ended up not being the
case, and setting the flag would also affect outgoing data.

Suggested-by: Mat Martineau <martineau@kernel.org>
Acked-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-08-02 10:47:39 -07:00
Matthieu Baerts (NGI0)
8251786f3d man: mptcp: 'port' has to be used with 'signal'
That's what is enforced by the kernel: the 'port' is used to create a
new listening socket on that port, not to create a new subflow from/to
that port. It then requires the 'signal' flag.

Acked-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-08-02 10:47:39 -07:00
Matthieu Baerts (NGI0)
80392875fa man: mptcp: clarify 'signal' and 'subflow' flags
According to some bug reports on the MPTCP project, these options might
be a bit confusing for some.

Mentioning that the 'signal' flag is typically for a server, and the
'subflow' one is typically for a client should help the user knowing in
which context which flag should be picked.

Acked-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-08-02 10:47:39 -07:00
Matthieu Baerts (NGI0)
484009f46e man: mptcp: document 'dev IFNAME'
It was missing, while it is a very important option.

Indeed, without it, the kernel might not pick the right interface to
send packets for additional subflows. Mention that in the man page.

Acked-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-08-02 10:47:39 -07:00
Stephen Hemminger
ae32ba8273 uapi: update to 6.11-rc1
Update from 6.11-rc1

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-07-29 09:37:31 -07:00
Stephen Hemminger
c436c80e7f man: update ip-address man page
The ip address man page had some small things that needed update:
  - ip address delete without address returns not supported
  - always use full words for commands in man pages
       (ie "delete" not "del")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-07-25 11:24:45 -07:00
xixiliguo
3e807112fd ss: fix expired time format of timer
When expired time of time-wait timer is less than or equal to 9 seconds,
as shown below, result that below 1 sec is incorrect.
Expect output should be show 9 seconds and 373 millisecond, but 9.373ms
mean only 9 millisecond and 373 microseconds

Before:
TIME-WAIT 0      0     ...    timer:(timewait,12sec,0)
TIME-WAIT 0      0     ...    timer:(timewait,11sec,0)
TIME-WAIT 0      0     ...    timer:(timewait,10sec,0)
TIME-WAIT 0      0     ...    timer:(timewait,9.373ms,0)
TIME-WAIT 0      0     ...    timer:(timewait,8.679ms,0)
TIME-WAIT 0      0     ...    timer:(timewait,1.574ms,0)
TIME-WAIT 0      0     ...    timer:(timewait,954ms,0)
TIME-WAIT 0      0     ...    timer:(timewait,303ms,0)

After:
TIME-WAIT 0      0     ...    timer:(timewait,13sec,0)
TIME-WAIT 0      0     ...    timer:(timewait,12sec,0)
TIME-WAIT 0      0     ...    timer:(timewait,10sec,0)
TIME-WAIT 0      0     ...    timer:(timewait,9.501sec,0)
TIME-WAIT 0      0     ...    timer:(timewait,8.990sec,0)
TIME-WAIT 0      0     ...    timer:(timewait,7.865sec,0)
TIME-WAIT 0      0     ...    timer:(timewait,1.098sec,0)
TIME-WAIT 0      0     ...    timer:(timewait,476ms,0)

Signed-off-by: xixiliguo <xixiliguo@foxmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-07-25 10:37:53 -07:00
Beniamino Galvani
554ea3649d ip: do not print stray prefixes in monitor mode
When running "ip monitor", accept_msg() first prints the prefix and
then calls the object-specific print function, which also does the
filtering. Therefore, it is possible that the prefix is printed even
for events that get ignored later. For example:

  ip link add dummy1 type dummy
  ip link set dummy1 up
  ip -ts monitor all dev dummy1 &
  ip link add dummy2 type dummy
  ip addr add dev dummy1 192.0.2.1/24

generates:

  [2024-07-12T22:11:26.338342] [LINK][2024-07-12T22:11:26.339846] [ADDR]314: dummy1    inet 192.0.2.1/24 scope global dummy1
       valid_lft forever preferred_lft forever

Fix this by printing the prefix only after the filtering. Now the
output for the commands above is:

 [2024-07-12T22:11:26.339846] [ADDR]314: dummy1    inet 192.0.2.1/24 scope global dummy1
       valid_lft forever preferred_lft forever

See also commit 7e0a889b54 ("bridge: Do not print stray prefixes in
monitor mode") which fixed the same problem in the bridge tool.

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-07-17 16:48:25 -07:00