mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-13 00:47:24 +00:00
veth and vxcan need to make sure the ifindexes of the peer
are not negative, core does not validate this.
Using iproute2 with user-space-level checking removed:
Before:
# ./ip link add index 10 type veth peer index -1
# ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 52:54:00:74:b2:03 brd ff:ff:ff:ff:ff:ff
10: veth1@veth0: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 8a:90:ff:57:6d:5d brd ff:ff:ff:ff:ff:ff
-1: veth0@veth1: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether ae:ed:18:e6:fa:7f brd ff:ff:ff:ff:ff:ff
Now:
$ ./ip link add index 10 type veth peer index -1
Error: ifindex can't be negative.
This problem surfaced in net-next because an explicit WARN()
was added, the root cause is older.
Fixes:
|
||
|---|---|---|
| .. | ||
| c_can | ||
| cc770 | ||
| ctucanfd | ||
| dev | ||
| flexcan | ||
| ifi_canfd | ||
| m_can | ||
| mscan | ||
| peak_canfd | ||
| rcar | ||
| sja1000 | ||
| slcan | ||
| softing | ||
| spi | ||
| usb | ||
| at91_can.c | ||
| bxcan.c | ||
| can327.c | ||
| grcan.c | ||
| janz-ican3.c | ||
| Kconfig | ||
| kvaser_pciefd.c | ||
| Makefile | ||
| sun4i_can.c | ||
| ti_hecc.c | ||
| vcan.c | ||
| vxcan.c | ||
| xilinx_can.c | ||