Commit Graph

1098 Commits

Author SHA1 Message Date
Stephen Hemminger
b6d1708663 uapi: update of virtio_ids
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-05-13 14:34:43 -07:00
Stephen Hemminger
d8a7a0f4f7 uapi: upstream update to stddef.h
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-04-18 08:23:52 -07:00
Stephen Hemminger
5b2ff061a2 uapi: update from 5.18-rc1
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-04-06 08:22:40 -07:00
David Ahern
a17aac1b52 Merge branch 'main' into next
Signed-off-by: David Ahern <dsahern@kernel.org>
2022-03-24 08:10:00 -06:00
Stephen Hemminger
4c424dfd88 v5.17.0 2022-03-22 07:59:11 -07:00
David Ahern
f1d18e2e6e Update kernel headers
Update kernel headers to commit:
    092d992b76ed ("Merge tag 'mlx5-updates-2022-03-18' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux")

Signed-off-by: David Ahern <dsahern@kernel.org>
2022-03-20 17:33:41 -06:00
David Ahern
cd37d6037f Merge branch 'main' into next
Signed-off-by: David Ahern <dsahern@kernel.org>
2022-03-12 08:58:37 -07:00
Andrea Claudi
1808f002df lib/fs: fix memory leak in get_task_name()
asprintf() allocates memory which is not freed on the error path of
get_task_name(), thus potentially leading to memory leaks.
%m specifier on fscanf allocates memory, too, which needs to be freed by
the caller.

This reworks get_task_name() to avoid memory allocation.
- Pass a buffer and its length to the function, similarly to what
  get_command_name() does, thus avoiding to allocate memory for
  the string to be returned;
- Use snprintf() instead of asprintf();
- Use fgets() instead of fscanf() to limit string length.

Fixes: 81bfd01a4c ("lib: move get_task_name() from rdma")
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-03-11 19:10:48 -08:00
David Ahern
0431d8e8c4 Import batman_adv.h header from last kernel sync point
Signed-off-by: David Ahern <dsahern@kernel.org>
2022-03-11 09:20:30 -07:00
Stephen Hemminger
62c0700c7b uapi: update magic.h
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-03-10 17:23:23 -08:00
David Ahern
ac4e0913be bpf: Export bpf syscall wrapper
Move bpf syscall wrapper to bpf_glue to make it available to libbpf
based functions.

Signed-off-by: David Ahern <dsahern@kernel.org>
2022-03-07 08:52:08 -07:00
Stephen Hemminger
86a1452b47 uapi: update to xfrm.h
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-03-04 14:26:09 -08:00
David Ahern
04a0077deb Update kernel headers
Update kernel headers to commit:
    1039135aedfc ("net: ethernet: sun: Remove redundant code")

Signed-off-by: David Ahern <dsahern@kernel.org>
2022-03-04 09:12:40 -07:00
David Ahern
7848f6bb70 Update kernel headers
Update kernel headers to commit:
    7b779cc8846a ("Merge branch 'octeontx2-ptp-updates'")

Signed-off-by: David Ahern <dsahern@kernel.org>
2022-02-21 09:26:21 -07:00
David Ahern
cd24451e79 Update kernel headers
Update kernel headers to commit:
    d8c2858181cc ("net/switchdev: use struct_size over open coded arithmetic")

Signed-off-by: David Ahern <dsahern@kernel.org>
2022-02-10 09:51:07 -08:00
Stephen Hemminger
9d5e29e60f utils: add format attribute
One more format attribute needed to resolve clang warnings.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
2022-01-26 10:19:08 -07:00
Stephen Hemminger
5c9571bc8b uapi: update kernel headers from 5.17-rc1
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-01-24 09:55:39 -08:00
Stephen Hemminger
e27bb8e5df uapi: add missing virtio headers
These headers are referred to by virtio_net but were
not in uapi directory.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-01-15 10:39:43 -08:00
Stephen Hemminger
26ff0afa6f uapi: add missing rose and ax25 files
All iproute2 headers should come from sanitized kernel headers
not the local system.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-01-15 10:38:58 -08:00
David Ahern
ac2e914895 Update kernel headers
Update kernel headers to commit:
    fe8152b38d3a ("Merge tag 'devprop-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm")

Signed-off-by: David Ahern <dsahern@kernel.org>
2022-01-12 10:31:20 -07:00
David Ahern
44ca91ceec Merge branch 'main' into next
Signed-off-by: David Ahern <dsahern@kernel.org>
2022-01-11 09:16:35 -07:00
Stephen Hemminger
ade99e208c v5.16.0 2022-01-10 15:24:04 -08:00
David Ahern
5cb7ec0c8d Update kernel headers and import virtio_net
Update kernel headers to commit:
    f85b244ee395 ("xdp: move the if dev statements to the first")

and import virtio_net.h for vdpa.

Signed-off-by: David Ahern <dsahern@kernel.org>
2021-12-18 14:00:29 -07:00
Stephen Hemminger
4734fdb932 uapi: update to mptcp.h
From 5.16-rc5

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2021-12-17 15:24:54 -08:00
Stephen Hemminger
3f77bc6253 uapi: update to if_ether.h
Merged from 5.16-rc3

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2021-12-03 12:20:02 -08:00
David Ahern
2d777dfe7b Update kernel headers
Update kernel headers to commit:
    bb14bfc7eb92 ("net: lan966x: fix a IS_ERR() vs NULL check in lan966x_create_targets()")

Signed-off-by: David Ahern <dsahern@kernel.org>
2021-12-03 10:17:51 -07:00
Stephen Hemminger
fa58de9b0c vdpa: align uapi headers
Update vdpa headers based on 5.16.0-rc1 and remove redundant
copy.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2021-11-18 09:56:57 -08:00
Parav Pandit
a21458fc35 vdpa: Remove duplicate vdpa UAPI header file
vdpa header file is already present in the tree at
vdpa/include/uapi/linux/vdpa.h and used by vdpa/vdpa.c.

As we discussed in thread [1] vdpa header comes from a different
tree, similar to rdma subsystem. Hence remove the duplicate vdpa
UAPI header file.

[1] https://www.spinics.net/lists/netdev/msg748458.html

Fixes: b5a6ed9cc9 ("uapi: add missing virtio related headers")
Signed-off-by: Parav Pandit <parav@nvidia.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
2021-11-18 10:21:42 -07:00
Stephen Hemminger
35c81b18c4 uapi: update vdpa.h
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2021-11-09 10:40:40 -08:00
David Ahern
50b668bdbf Merge branch 'main' into next
Signed-off-by: David Ahern <dsahern@kernel.org>
2021-11-04 09:45:31 -06:00
David Ahern
9cae1de564 Import amt.h
Impor amt.h uapi from last kernel sync point

Signed-off-by: David Ahern <dsahern@kernel.org>
2021-11-03 13:23:38 -06:00
David Ahern
258e350ca9 Update kernel headers
Update kernel headers to commit:
    cc0356d6a02e ("Merge tag 'x86_core_for_v5.16_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip")

Signed-off-by: David Ahern <dsahern@kernel.org>
2021-11-03 13:22:15 -06:00
Stephen Hemminger
7a8b7573a4 v5.15.0 2021-11-01 16:41:02 -07:00
Stephen Hemminger
229eaba507 uapi: pickup fix for xfrm ABI breakage
See kernel
Commit 844f7eaaed9 ("include/uapi/linux/xfrm.h: Fix XFRM_MSG_MAPPING ABI breakage")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2021-10-15 17:40:30 -07:00
David Ahern
e4ca6a4965 Update kernel headers
Update kernel headers to commit:
    295711fa8fec ("Merge branch 'dpaa2-irq-coalescing'")

Signed-off-by: David Ahern <dsahern@kernel.org>
2021-10-15 17:49:19 -06:00
David Ahern
6448ed373c Update kernel headers
Update kernel headers to commit:
    49ed8dde3715 ("net: usb: use eth_hw_addr_set() for dev->addr_len cases")

Update to linux/mptcp.h is removed because it breaks compilation
of ipmptcp.c in a nontrivial way.

Signed-off-by: David Ahern <dsahern@kernel.org>
2021-10-05 08:28:28 -06:00
Ralf Baechle
26c5782fab ROSE: Add rose_ntop implementation.
ROSE addresses are ten digit numbers, basically like North American
telephone numbers.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
2021-09-23 20:02:45 -06:00
Ralf Baechle
c63b769ad4 NETROM: Add netrom_ntop implementation.
NETROM uses AX.25 addresses so this is a simple wrapper around ax25_ntop1.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
2021-09-23 20:02:37 -06:00
Ralf Baechle
3a92669b3a AX.25: Add ax25_ntop implementation.
AX.25 addresses are based on Amateur radio callsigns followed by an SSID
like XXXXXX-SS where the callsign is up to 6 characters which are either
letters or digits and the SSID is a decimal number in the range 0..15.
Amateur radio callsigns are assigned by a country's relevant authorities
and are 3..6 characters though a few countries have assigned callsigns
longer than that.  AX.25 is not able to handle such longer callsigns.

Being based on HDLC AX.25 encodes addresses by shifting them one bit left
thus zeroing bit 0, the HDLC extension bit for all but the last bit of
a packet's address field but for our purposes here we're not considering
the HDLC extension bit that is it will always be zero.

Linux' internal representation of AX.25 addresses in Linux is very similar
to this on the on-air or on-the-wire format.  The callsign is padded to
6 octets by adding spaces, followed by the SSID octet then all 7 octets
are left-shifted by one byte.

This for example turns "LINUX-1" where the callsign is LINUX and SSID is 1
into 98:92:9c:aa:b0:40:02.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
2021-09-23 20:02:30 -06:00
Stephen Hemminger
92e32f7791 uapi: updates from 5.15-rc1
Small changes to virtio etc.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2021-09-13 15:07:58 -07:00
Stephen Hemminger
7a70524270 ip: remove leftovers from IPX and DECnet
Iproute2 has not supported DECnet or IPX since version 5.0.
There were some leftover support in the ip options flags
and parsing, remove these.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2021-09-01 14:03:53 -07:00
Stephen Hemminger
8ab1834e56 uapi: update headers from 5.15 merge
New headers from 5.15 early merge.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2021-09-01 14:02:50 -07:00
David Ahern
926ad64104 Update kernel headers
Update kernel headers to commit:
    88be32634905 ("Merge branch 'dsa-tagger-helpers'")

Signed-off-by: David Ahern <dsahern@kernel.org>
2021-09-01 12:51:44 -07:00
David Ahern
acbdef9386 Import ioam6 uapi headers
Import ioam6 uapi headers from kernel headers at last sync commit.

Signed-off-by: David Ahern <dsahern@kernel.org>
2021-09-01 12:51:44 -07:00
David Ahern
2d6fa30bb8 Update kernel headers
Update kernel headers to commit:
    1187c8c4642d ("net: phy: mscc: make some arrays static const, makes object smaller")

Signed-off-by: David Ahern <dsahern@kernel.org>
2021-09-01 12:51:44 -07:00
Stephen Hemminger
169f36a0c9 v5.14.0 2021-08-31 11:57:59 -07:00
Stephen Hemminger
1afde09498 uapi: update neighbour.h
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2021-08-18 14:09:34 -07:00
Stephen Hemminger
7a7e9ed98f uapi: headers update
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2021-07-17 11:12:47 -07:00
Alexander Mikhalitsyn
459ce6e3d7 ip route: ignore ENOENT during save if RT_TABLE_MAIN is being dumped
We started to use in-kernel filtering feature which allows to get only
needed tables (see iproute_dump_filter()). From the kernel side it's
implemented in net/ipv4/fib_frontend.c (inet_dump_fib), net/ipv6/ip6_fib.c
(inet6_dump_fib). The problem here is that behaviour of "ip route save"
was changed after
c7e6371bc ("ip route: Add protocol, table id and device to dump request").
If filters are used, then kernel returns ENOENT error if requested table
is absent, but in newly created net namespace even RT_TABLE_MAIN table
doesn't exist. It is really allocated, for instance, after issuing
"ip l set lo up".

Reproducer is fairly simple:
$ unshare -n ip route save > dump
Error: ipv4: FIB table does not exist.
Dump terminated

Expected result here is to get empty dump file (as it was before this
change).

v2: reworked, so, now it takes into account NLMSGERR_ATTR_MSG
(see nl_dump_ext_ack_done() function). We want to suppress error messages
in stderr about absent FIB table from kernel too.

v3: reworked to make code clearer. Introduced rtnl_suppressed_errors(),
rtnl_suppress_error() helpers. User may suppress up to 3 errors (may be
easily extended by changing SUPPRESS_ERRORS_INIT macro).

v4: reworked, rtnl_dump_filter_errhndlr() was introduced. Thanks
to Stephen Hemminger for comments and suggestions

v5: space fixes, commit message reformat, empty initializers

Fixes: c7e6371bc ("ip route: Add protocol, table id and device to dump request")
Cc: David Ahern <dsahern@gmail.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: Andrei Vagin <avagin@gmail.com>
Cc: Alexander Mikhalitsyn <alexander@mihalicyn.com>
Signed-off-by: Alexander Mikhalitsyn <alexander.mikhalitsyn@virtuozzo.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2021-07-07 07:32:56 -07:00
Stephen Hemminger
8f85d085fe uapi: update kernel headers from 5.14-rc1
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2021-07-06 17:07:24 -07:00