Commit Graph

6407 Commits

Author SHA1 Message Date
Stephen Hemminger
22edc0cf37 rdma: use standard flag for json
The other iproute2 utils use variable json as flag.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-01-03 16:48:33 -08:00
Stephen Hemminger
674e00aeab rdma: shorten print_ lines
With the shorter form of print_ function some of the lines can
now be shortened. Max line length in iproute2 should be 100 characters
or less.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-01-03 16:48:33 -08:00
Stephen Hemminger
43a0e300dd ip: merge duplicate if clauses
The code that handles brief option had two exactly matching
if (filter == AF_PACKET) clauses; merge them

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-01-03 16:30:26 -08:00
Eli Schwartz
48c969d49e configure: avoid un-recommended command substitution form
The use of backticks to surround commands instead of "$(cmd)" is a
legacy of the oldest pre-POSIX shells. It is confusing, unreliable, and
hard to read. Its use is not recommended in new programs.

Link: http://mywiki.wooledge.org/BashFAQ/082

Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-01-01 11:00:32 -08:00
Stephen Hemminger
9b578bbade rdma: use print_XXX instead of COLOR_NONE
The rdma utility should be using same code pattern as rest of
iproute2. When printing, color should only be requested when
desired; if no color wanted, use the simpler print_XXX instead.

Fixes: b0a688a542 ("rdma: Rewrite custom JSON and prints logic to use common API")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-01-01 10:46:30 -08:00
Stephen Hemminger
8415b042f6 ip-link: use shorter URL to kernel docs
Use shorter URL (docs.kernel.org) so that manual entry does not
have too long a line. The debian troff checker would fail when
doing make check.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-22 10:21:51 -08:00
Benjamin Poirier
d205b5cf38 bridge: Provide rta_type()
Factor out the repeated code pattern
rta_type = attr->rta_type & NLA_TYPE_MASK
into a helper which is similar to the existing kernel function nla_type().

Reviewed-by: Petr Machata <petrm@nvidia.com>
Tested-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-22 09:58:16 -08:00
Benjamin Poirier
1d73bfc8ab bridge: Deduplicate print_range()
The two implementations are now identical so keep only one instance and
move it to json_print.c where there are already a few other specialized
printing functions.

The string that's formatted in the "end" buffer is only needed when
outputting a range so move the snprintf() call within the condition.

The second argument's purpose is better conveyed by calling it "end" rather
than "id" so rename it.

Reviewed-by: Petr Machata <petrm@nvidia.com>
Tested-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-22 09:57:54 -08:00
Benjamin Poirier
dd4e1749a9 bridge: vni: Indent statistics with 2 spaces
`bridge -s vlan` indents statistics with 2 spaces compared to the vlan id
column while `bridge -s vni` indents them with 1 space. Change `bridge vni`
to match the behavior of `bridge vlan` since that second command predates
`bridge vni`.

Before:
$ bridge -s vni
dev               vni                group/remote
vxlan1            4001
                   RX: bytes 0 pkts 0 drops 0 errors 0
                   TX: bytes 0 pkts 0 drops 0 errors 0
                  4002               10.0.0.1
                   RX: bytes 0 pkts 0 drops 0 errors 0
                   TX: bytes 0 pkts 0 drops 0 errors 0
vxlan2            100
                   RX: bytes 0 pkts 0 drops 0 errors 0
                   TX: bytes 0 pkts 0 drops 0 errors 0

After:
$ bridge -s vni
dev               vni                group/remote
vxlan1            4001
                    RX: bytes 0 pkts 0 drops 0 errors 0
                    TX: bytes 0 pkts 0 drops 0 errors 0
                  4002               10.0.0.1
                    RX: bytes 0 pkts 0 drops 0 errors 0
                    TX: bytes 0 pkts 0 drops 0 errors 0
vxlan2            100
                    RX: bytes 0 pkts 0 drops 0 errors 0
                    TX: bytes 0 pkts 0 drops 0 errors 0

Reviewed-by: Petr Machata <petrm@nvidia.com>
Tested-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-22 09:54:23 -08:00
Benjamin Poirier
717f2f82f1 bridge: vni: Align output columns
Use fixed column widths to improve readability.

These changes are similar to commit e0c457b1a5 ("bridge: Align output
columns").

Before:
$ bridge vni
dev               vni              group/remote
vxlan1             4001
                   4002           10.0.0.1
                   5000-5010
                   16777214-16777215        10.0.0.2
vxlan2             100

After:
$ bridge vni
dev               vni                group/remote
vxlan1            4001
                  4002               10.0.0.1
                  5000-5010
                  16777214-16777215  10.0.0.2
vxlan2            100

Reviewed-by: Petr Machata <petrm@nvidia.com>
Tested-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-22 09:54:23 -08:00
Benjamin Poirier
562b208a7b bridge: vni: Remove unused argument in open_vni_port()
Reviewed-by: Petr Machata <petrm@nvidia.com>
Tested-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-22 09:54:23 -08:00
Benjamin Poirier
7d8509d84c bridge: vni: Replace open-coded instance of print_nl()
Reviewed-by: Petr Machata <petrm@nvidia.com>
Tested-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-22 09:54:23 -08:00
Benjamin Poirier
4f11b21e02 bridge: vni: Remove stray newlines after each interface
Currently, `bridge vni` outputs an empty line after each interface. This is
not consistent with the output style of other iproute2 commands, in
particular `bridge vlan`. Therefore, remove the empty lines.

If there are scripts that parse the normal text output of `bridge vni`,
those scripts might be broken by the removal of the empty lines. This is a
secondary concern because those scripts should consume the JSON output
instead.

Before:
$ bridge vni
dev               vni              group/remote
vxlan1             4001
                   5000-5010

vxlan2             100

$

After:
$ ./bridge/bridge vni
dev               vni              group/remote
vxlan1             4001
                   5000-5010
vxlan2             100
$

Reviewed-by: Petr Machata <petrm@nvidia.com>
Tested-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-22 09:54:23 -08:00
Benjamin Poirier
14c9845f05 bridge: vni: Reverse the logic in print_vnifilter_rtm()
print_vnifilter_rtm() is structured similarly to print_vlan_tunnel_info()
except that in the former, the open_vni_port() call is guarded by a "if
(first)" check whereas in the latter, the open_vlan_port() call is guarded
by a "if (!opened)" check.

Reverse the logic in one of the functions to have the same structure in
both. Since the calls being guarded are "open_...()", "close_...()", use
the "opened" logic structure.

Reviewed-by: Petr Machata <petrm@nvidia.com>
Tested-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-22 09:54:23 -08:00
Benjamin Poirier
7418335b4b bridge: vni: Guard close_vni_port() call
Currently, the call to open_vni_port() within print_vnifilter_rtm() is
written in a way that is safe if there is a RTM_{NEW,DEL,GET}TUNNEL message
without any VXLAN_VNIFILTER_ENTRY attribute. However the close_vni_port()
call is written in a way that assumes there is always at least one
VXLAN_VNIFILTER_ENTRY attribute within every RTM_*TUNNEL message. At this
time, this assumption is correct. However, the code should be consistent in
its assumptions. Choose the safe approach and fix the asymmetry between the
open_vni_port() and close_vni_port() calls by guarding the latter call with
a check.

Reviewed-by: Petr Machata <petrm@nvidia.com>
Tested-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-22 09:54:23 -08:00
Benjamin Poirier
b627c387eb bridge: vni: Move open_json_object() within print_vni()
print_vni() is used to output one vni or vni range which, in json output
mode, looks like
      {
        "vni": 100
      }

Currently, the closing bracket is handled within the function but the
opening bracket is handled by open_json_object() before calling the
function. For consistency, move the call to open_json_object() within
print_vni().

Reviewed-by: Petr Machata <petrm@nvidia.com>
Tested-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-22 09:54:23 -08:00
Benjamin Poirier
060eac10e7 bridge: vni: Remove print_vnifilter_rtm_filter()
print_vnifilter_rtm_filter() adds an unnecessary level of indirection so
remove it to simplify the code.

Reviewed-by: Petr Machata <petrm@nvidia.com>
Tested-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-22 09:54:23 -08:00
Benjamin Poirier
0b8508f44d bridge: vlan: Remove paranoid check
To make the code lighter, remove the check on the actual print_range()
output width. In the odd case that an out-of-range, wide vlan id is
printed, printf() will treat the negative field width as positive and the
output will simply be further misaligned.

Suggested-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Tested-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-22 09:54:23 -08:00
Benjamin Poirier
cf7b528a21 bridge: vlan: Use printf() to avoid temporary buffer
Currently, print_vlan_tunnel_info() is first outputting a formatted string
to a temporary buffer in order to use print_string() which can handle json
or normal text mode. Since this specific string is only output in normal
text mode, by calling printf() directly, we can avoid the need to first
output to a temporary string buffer.

Reviewed-by: Petr Machata <petrm@nvidia.com>
Tested-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-22 09:54:23 -08:00
Benjamin Poirier
58c8a08175 bridge: vni: Fix vni filter help strings
Add the missing 'vni' subcommand to the top level `bridge help`.
For `bridge vni { add | del } ...`, 'dev' is a mandatory argument.
For `bridge vni show`, 'dev' is an optional argument.

Fixes: 45cd32f9f7 ("bridge: vxlan device vnifilter support")
Reviewed-by: Petr Machata <petrm@nvidia.com>
Tested-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-22 09:54:23 -08:00
Benjamin Poirier
aeb7ee2973 bridge: vni: Report duplicate vni argument using duparg()
When there is a duplicate 'vni' option, report the error using duparg()
instead of the generic invarg().

Before:
$ bridge vni add vni 100 vni 101 dev vxlan2
Error: argument "101" is wrong: duplicate vni

After:
$ ./bridge/bridge vni add vni 100 vni 101 dev vxlan2
Error: duplicate "vni": "101" is the second value.

Fixes: 45cd32f9f7 ("bridge: vxlan device vnifilter support")
Reviewed-by: Petr Machata <petrm@nvidia.com>
Tested-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-22 09:54:23 -08:00
Benjamin Poirier
0b8c01b405 bridge: vni: Fix duplicate group and remote error messages
Consider the following command with a duplicated "remote" argument:
$ bridge vni add vni 150 remote 10.0.0.1 remote 10.0.0.2 dev vxlan2
Error: argument "remote" is wrong: duplicate group

The error message is misleading because there is no "group" argument. Both
of the "group" and "remote" options specify a destination address and are
mutually exclusive so change the variable name and error messages
accordingly.

The result is:
$ ./bridge/bridge vni add vni 150 remote 10.0.0.1 remote 10.0.0.2 dev vxlan2
Error: duplicate "destination": "10.0.0.2" is the second value.

Fixes: 45cd32f9f7 ("bridge: vxlan device vnifilter support")
Reviewed-by: Petr Machata <petrm@nvidia.com>
Tested-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-22 09:54:23 -08:00
Benjamin Poirier
ba1e68f04b bridge: vni: Remove dead code in group argument parsing
is_addrtype_inet_not_multi(&daddr) may read an uninitialized "daddr". Even
if that is fixed, the error message that follows cannot be reached because
the situation would be caught by the previous test (group_present).
Therefore, remove this test on daddr.

Fixes: 45cd32f9f7 ("bridge: vxlan device vnifilter support")
Reviewed-by: Petr Machata <petrm@nvidia.com>
Tested-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-22 09:54:23 -08:00
Benjamin Poirier
e8177094d5 bridge: vni: Accept 'del' command
`bridge vni help` shows "bridge vni { add | del } ..." but currently
`bridge vni del ...` errors out unexpectedly:
	# bridge vni del
	Command "del" is unknown, try "bridge vni help".

Recognize 'del' as a synonym of the original 'delete' command.

Fixes: 45cd32f9f7 ("bridge: vxlan device vnifilter support")
Reviewed-by: Petr Machata <petrm@nvidia.com>
Tested-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-22 09:54:23 -08:00
Stephen Hemminger
a66a73af6d configure: drop test for ATM
The ATM qdisc was removed by:
commit 8a20feb638 ("tc: drop support for ATM qdisc")
but configure check was not removed.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-22 09:26:59 -08:00
Phil Sutter
33f73690f1 man: Fix malformatted database file locations
The .BR macro does not put spaces in between its arguments. Also it will
apply to all arguments.

Fixes: 0a0a8f12fa ("Read configuration files from /etc and /usr")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-20 19:45:54 -08:00
Phil Sutter
aba8530da6 man: ip-route.8: Fix typo in rt_protos location spec
RTPROTO description erroneously specified /etc/iproute2/rt_protos twice.

Fixes: 0a0a8f12fa ("Read configuration files from /etc and /usr")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-20 19:45:11 -08:00
Jiri Pirko
1a68525f46 mnl_utils: sanitize incoming netlink payload size in callbacks
Don't trust the kernel to send payload of certain size. Sanitize that by
checking the payload length in mnlu_cb_stop() and mnlu_cb_error() and
only access the payload if it is of required size.

Note that for mnlu_cb_stop(), this is happening already for example
with devlink resource. Kernel sends NLMSG_DONE with zero size payload.

Fixes: 049c58539f ("devlink: mnlg: Add support for extended ack")
Fixes: c934da8aaa ("devlink: mnlg: Catch returned error value of dumpit commands")
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-08 09:30:11 -08:00
Stephen Hemminger
aed89de0e1 uapi: update stddef.h
Change from upstream 6.7-rc4

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-08 09:27:59 -08:00
Quentin Deslandes
1607bf531f ss: prevent "Process" column from being printed unless requested
Commit 5883c6eba5 ("ss: show header for --processes/-p") added
"Process" to the list of columns printed by ss. However, the "Process"
header is now printed even if --processes/-p is not used.

This change aims to fix this by moving the COL_PROC column ID to the same
index as the corresponding column structure in the columns array, and
enabling it if --processes/-p is used.

Fixes: 5883c6eba5 ("ss: show header for --processes/-p")
Signed-off-by: Quentin Deslandes <qde@naccy.de>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-06 09:41:09 -08:00
Stephen Hemminger
4913a5c206 ip: require RTM_NEWLINK
The kernel support for creating network devices was added back
in 2007 and iproute2 has been carrying backward compatability
support since then. After 16 years, it is enough time to
drop the code.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-03 10:27:19 -08:00
Stephen Hemminger
ac404c4231 iplink: spelling fix in error message
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-11-28 20:47:49 -08:00
heminhong
389657c3ec iproute2: prevent memory leak on error return
When rtnl_statsdump_req_filter() or rtnl_dump_filter() failed to process,
just return will cause memory leak.

Signed-off-by: heminhong <heminhong@kylinos.cn>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-11-28 20:47:02 -08:00
Stephen Hemminger
f7a5875832 man: allow up to 100 character lines
There are some long URL's that cause warnings from the
man page checker. Go ahead and allow these even though Debian
lintian may still complain.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-11-19 08:56:43 -08:00
Stephen Hemminger
3193d2c224 man: fix man page errors
Debian is now more picky about man pages.
Need to tell man command that tbl is being used on a man page now.
Also, font macros need to have proper font.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-11-17 09:22:19 -08:00
Stephen Hemminger
e6e5f774f4 ip: move get_failed blocks
Rather than doing goto back into the middle of an earlier
if() statement. Move the error returns to the end of the functions
to follow kernel coding practice.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-11-17 09:16:14 -08:00
heminhong
2c3ebb2ae0 iproute2: prevent memory leak
When the return value of rtnl_talk() is not less than 0,
'answer' will be allocated. The 'answer' should be free
after using, otherwise it will cause memory leak.

Fixes: a066cc6623 ("gre/gre6: Unify local/remote endpoint address parsing")
Signed-off-by: heminhong <heminhong@kylinos.cn>
Reviewed-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-11-17 08:41:43 -08:00
Andrea Claudi
962692356a Makefile: use /usr/share/iproute2 for config files
According to FHS:

"/usr/lib includes object files and libraries. On some systems, it may
also include internal binaries that are not intended to be executed
directly by users or shell scripts."

A better directory to store config files is /usr/share:

"The /usr/share hierarchy is for all read-only architecture independent
data files.

This hierarchy is intended to be shareable among all architecture
platforms of a given OS; thus, for example, a site with i386, Alpha, and
PPC platforms might maintain a single /usr/share directory that is
centrally-mounted."

Accordingly, move configuration files to $(DATADIR)/iproute2.

Fixes: 946753a445 ("Makefile: ensure CONF_USR_DIR honours the libdir config")
Reported-by: Luca Boccassi <luca.boccassi@gmail.com>
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-11-16 19:21:52 -08:00
Stephen Hemminger
22f27fcb13 uapi: update headers from 6.7-rc1
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-11-13 08:38:58 -08:00
Max Kunzelmann
78eebdbc7d libnetlink: validate nlmsg header length first
Validate the nlmsg header length before accessing the nlmsg payload
length.

Fixes: 892a25e286 ("libnetlink: break up dump function")

Signed-off-by: Max Kunzelmann <maxdev@posteo.de>
Reviewed-by: Benny Baumann <BenBE@geshi.org>
Reviewed-by: Robert Geislinger <github@crpykng.de>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-11-09 09:03:57 -08:00
Luca Boccassi
deb66acabe Revert "Makefile: ensure CONF_USR_DIR honours the libdir config"
LIBDIR in Debian and derivatives is not /usr/lib/, it's
/usr/lib/<architecture triplet>/, which is different, and it's the
wrong location where to install architecture-independent default
configuration files, which should always go to /usr/lib/ instead.
Installing these files to the per-architecture directory is not
the right thing, hence revert the change.

This reverts commit 946753a445.

Signed-off-by: Luca Boccassi <bluca@debian.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-11-09 09:03:18 -08:00
Stephen Hemminger
cb0709b74f Merge branch 'main' of git://git.kernel.org/pub/scm/network/iproute2/iproute2-next 2023-11-06 12:40:38 -08:00
Ido Schimmel
77138a2f94 bridge: mdb: Add get support
Implement MDB get functionality, allowing user space to query a single
MDB entry from the kernel instead of dumping all the entries. Example
usage:

 # bridge mdb add dev br0 port swp1 grp 239.1.1.1 vid 10
 # bridge mdb add dev br0 port swp2 grp 239.1.1.1 vid 10
 # bridge mdb add dev br0 port swp2 grp 239.1.1.5 vid 10
 # bridge mdb get dev br0 grp 239.1.1.1 vid 10
 dev br0 port swp1 grp 239.1.1.1 temp vid 10
 dev br0 port swp2 grp 239.1.1.1 temp vid 10
 # bridge -j -p mdb get dev br0 grp 239.1.1.1 vid 10
 [ {
         "index": 10,
         "dev": "br0",
         "port": "swp1",
         "grp": "239.1.1.1",
         "state": "temp",
         "flags": [ ],
         "vid": 10
     },{
         "index": 10,
         "dev": "br0",
         "port": "swp2",
         "grp": "239.1.1.1",
         "state": "temp",
         "flags": [ ],
         "vid": 10
     } ]
 # bridge mdb get dev br0 grp 239.1.1.1 vid 20
 Error: bridge: MDB entry not found.
 # bridge mdb get dev br0 grp 239.1.1.2 vid 10
 Error: bridge: MDB entry not found.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
2023-11-06 10:08:50 -07:00
David Ahern
34d5458cfb Update kernel headers
Update kernel headers to commit:
    ff269e2cd5ad ("Merge tag 'net-next-6.7-followup' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next")

Import mptcp_pm.h due to a new dependency.

Signed-off-by: David Ahern <dsahern@kernel.org>
2023-11-06 10:08:23 -07:00
Stephen Hemminger
6b79bc819f v6.6.0 2023-11-04 09:22:25 -07:00
Stephen Hemminger
a380da01a3 vv6.6.0 2023-11-03 18:04:49 -07:00
Stephen Hemminger
70b9e5998f ssfilter: fix clang warning about conversion
Clang warns:
ssfilter_check.c💯13: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-10-31 16:05:21 -07:00
Eric Dumazet
ef335508a8 ss: add support for rcv_wnd and rehash
tcpi_rcv_wnd and tcpi_rehash were added in linux-6.2.

$ ss -ti
...
 cubic wscale:7,7 ... minrtt:0.01 snd_wnd:65536 rcv_wnd:458496

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-10-31 10:57:33 -07:00
Stephen Hemminger
8a20feb638 tc: drop support for ATM qdisc
The upstream kernel dropped support for ATM qdisc in
fb38306ceb9e (net/sched: Retire ATM qdisc, 2023-02-14)

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-10-30 14:16:29 -07:00
Stephen Hemminger
11e6e783b6 tc: remove dsmark qdisc
The kernel has removed support for dsmark qdisc in commit
bbe77c14ee61 (net/sched: Retire dsmark qdisc, 2023-02-14)

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-10-30 11:35:32 -07:00