linux-stable/net/mpls
Benjamin Poirier b0ff618f2b net: mpls: Fix notifications when deleting a device
commit 7d4741eacd upstream.

There are various problems related to netlink notifications for mpls route
changes in response to interfaces being deleted:
* delete interface of only nexthop
	DELROUTE notification is missing RTA_OIF attribute
* delete interface of non-last nexthop
	NEWROUTE notification is missing entirely
* delete interface of last nexthop
	DELROUTE notification is missing nexthop

All of these problems stem from the fact that existing routes are modified
in-place before sending a notification. Restructure mpls_ifdown() to avoid
changing the route in the DELROUTE cases and to create a copy in the
NEWROUTE case.

Fixes: f8efb73c97 ("mpls: multipath route support")
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-12-08 08:46:55 +01:00
..
af_mpls.c net: mpls: Fix notifications when deleting a device 2021-12-08 08:46:55 +01:00
internal.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig
Makefile
mpls_gso.c net: avoid infinite loop in mpls_gso_segment when mpls_hlen == 0 2021-03-17 16:34:28 +01:00
mpls_iptunnel.c mpls: fix warning with multi-label encap 2020-01-27 14:46:37 +01:00