mirror-linux/drivers/net
Cambda Zhu f6d2e25c64 ipvlan: Fix return value of ipvlan_queue_xmit()
[ Upstream commit 8a9922e7be ]

ipvlan_queue_xmit() should return NET_XMIT_XXX, but
ipvlan_xmit_mode_l2/l3() returns rx_handler_result_t or NET_RX_XXX
in some cases. ipvlan_rcv_frame() will only return RX_HANDLER_CONSUMED
in ipvlan_xmit_mode_l2/l3() because 'local' is true. It's equal to
NET_XMIT_SUCCESS. But dev_forward_skb() can return NET_RX_SUCCESS or
NET_RX_DROP, and returning NET_RX_DROP(NET_XMIT_DROP) will increase
both ipvlan and ipvlan->phy_dev drops counter.

The skb to forward can be treated as xmitted successfully. This patch
makes ipvlan_queue_xmit() return NET_XMIT_SUCCESS for forward skb.

Fixes: 2ad7bf3638 ("ipvlan: Initial check-in of the IPVLAN driver.")
Signed-off-by: Cambda Zhu <cambda@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230626093347.7492-1-cambda@linux.alibaba.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-07-19 16:21:13 +02:00
..
appletalk
arcnet
bonding bonding: do not assume skb mac_header is set 2023-07-19 16:21:12 +02:00
caif
can can: kvaser_pciefd: Set hardware timestamp on transmitted packets 2023-07-19 16:21:11 +02:00
dsa net: dsa: mt7530: fix handling of LLDP frames 2023-06-28 11:12:31 +02:00
ethernet sfc: fix crash when reading stats while NIC is resetting 2023-07-19 16:21:13 +02:00
fddi
fjes
hamradio
hippi
hyperv
ieee802154 ieee802154: hwsim: Fix possible memory leaks 2023-06-28 11:12:27 +02:00
ipa
ipvlan ipvlan: Fix return value of ipvlan_queue_xmit() 2023-07-19 16:21:13 +02:00
mctp
mdio net: mdio: mvusb: Fix an error handling path in mvusb_mdio_probe() 2023-05-24 17:32:31 +01:00
netdevsim
pcs net: pcs: xpcs: fix C73 AN not getting enabled 2023-05-24 17:32:47 +01:00
phy Revert "net: phy: dp83867: perform soft reset and retain established link" 2023-06-28 11:12:33 +02:00
plip
ppp
pse-pd
slip
team net: fix stack overflow when LRO is disabled for virtual interfaces 2023-05-30 14:03:20 +01:00
usb net: usb: qmi_wwan: add support for Compal RXM-G1 2023-06-21 16:00:56 +02:00
vmxnet3
vxlan
wan net: lapbether: only support ethernet devices 2023-06-21 16:01:02 +02:00
wireguard
wireless wifi: ath9k: convert msecs to jiffies where needed 2023-07-19 16:21:11 +02:00
wwan net: wwan: t7xx: Ensure init is completed before system sleep 2023-06-09 10:34:15 +02:00
xen-netback
Kconfig
LICENSE.SRC
Makefile
Space.c
amt.c
bareudp.c
dummy.c
eql.c
geneve.c
gtp.c gtp: Fix use-after-free in __gtp_encap_destroy(). 2023-07-19 16:21:12 +02:00
ifb.c
loopback.c
macsec.c net: macsec: fix double free of percpu stats 2023-06-21 16:01:02 +02:00
macvlan.c
macvtap.c
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c net: add vlan_get_protocol_and_depth() helper 2023-05-24 17:32:32 +01:00
thunderbolt.c
tun.c tun: Fix memory leak for detached NAPI queue. 2023-05-24 17:32:47 +01:00
veth.c
virtio_net.c virtio_net: use control_buf for coalesce params 2023-06-14 11:15:28 +02:00
vrf.c
vsockmon.c
xen-netfront.c