linux-stable/include
Guillaume Nault 0992d67bc2 mpls: drop skb's dst in mpls_forward()
Commit 394de110a7 ("net: Added pointer check for
dst->ops->neigh_lookup in dst_neigh_lookup_skb") added a test in
dst_neigh_lookup_skb() to avoid a NULL pointer dereference. The root
cause was the MPLS forwarding code, which doesn't call skb_dst_drop()
on incoming packets. That is, if the packet is received from a
collect_md device, it has a metadata_dst attached to it that doesn't
implement any dst_ops function.

To align the MPLS behaviour with IPv4 and IPv6, let's drop the dst in
mpls_forward(). This way, dst_neigh_lookup_skb() doesn't need to test
->neigh_lookup any more. Let's keep a WARN condition though, to
document the precondition and to ease detection of such problems in the
future.

Signed-off-by: Guillaume Nault <gnault@redhat.com>
Link: https://lore.kernel.org/r/f8c2784c13faa54469a2aac339470b1049ca6b63.1604102750.git.gnault@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2020-11-03 12:55:53 -08:00
..
acpi pci-v5.10-changes 2020-10-22 12:41:00 -07:00
asm-generic vmlinux.lds.h: Keep .ctors.* with .ctors 2020-10-27 11:13:41 -07:00
clocksource
crypto
drm
dt-bindings ARM: Devicetree updates 2020-10-24 10:44:18 -07:00
keys
kunit treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
kvm ARM: 2020-10-23 11:17:56 -07:00
linux net: add kcov handle to skb extensions 2020-11-02 18:01:34 -08:00
math-emu
media ARM: SoC platform updates 2020-10-24 10:33:08 -07:00
memory
misc
net mpls: drop skb's dst in mpls_forward() 2020-11-03 12:55:53 -08:00
pcmcia
ras
rdma RDMA: Add rdma_connect_locked() 2020-10-28 09:14:49 -03:00
scsi SCSI misc on 20201023 2020-10-23 16:19:02 -07:00
soc net: mscc: ocelot: deny changing the native VLAN from the prepare phase 2020-11-02 17:09:07 -08:00
sound
target
trace afs: Fix afs_invalidatepage to adjust the dirty region 2020-10-29 13:53:04 +00:00
uapi net: bridge: mcast: add support for raw L2 multicast groups 2020-10-30 17:49:19 -07:00
vdso
video
xen xen: branch for v5.10-rc1c 2020-10-25 10:55:35 -07:00