From: Sasha Levin Date: Mon, 23 Mar 2020 20:22:07 +0000 (-0400) Subject: Fixes for 4.14 X-Git-Tag: v4.19.113~9^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5f4cf94851d0a83509408603d198c8e2d5a8e300;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 4.14 Signed-off-by: Sasha Levin --- diff --git a/queue-4.14/revert-ipv6-fix-handling-of-lla-with-vrf-and-sockets.patch b/queue-4.14/revert-ipv6-fix-handling-of-lla-with-vrf-and-sockets.patch new file mode 100644 index 00000000000..cebcd3dd63a --- /dev/null +++ b/queue-4.14/revert-ipv6-fix-handling-of-lla-with-vrf-and-sockets.patch @@ -0,0 +1,38 @@ +From 99eaab888ae68a3bd0ab7a83b50beb12392c44a0 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 23 Mar 2020 16:21:45 -0400 +Subject: Revert "ipv6: Fix handling of LLA with VRF and sockets bound to VRF" + +This reverts commit 0293f8d1bdd21b3eb71032edb5832f9090dea48e. + +This patch shouldn't have been backported to 4.14. + +Signed-off-by: Sasha Levin +--- + net/ipv6/tcp_ipv6.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c +index 5ec73cf386dfe..7b4ce3f9e2f4e 100644 +--- a/net/ipv6/tcp_ipv6.c ++++ b/net/ipv6/tcp_ipv6.c +@@ -718,7 +718,6 @@ static void tcp_v6_init_req(struct request_sock *req, + const struct sock *sk_listener, + struct sk_buff *skb) + { +- bool l3_slave = ipv6_l3mdev_skb(TCP_SKB_CB(skb)->header.h6.flags); + struct inet_request_sock *ireq = inet_rsk(req); + const struct ipv6_pinfo *np = inet6_sk(sk_listener); + +@@ -726,7 +725,7 @@ static void tcp_v6_init_req(struct request_sock *req, + ireq->ir_v6_loc_addr = ipv6_hdr(skb)->daddr; + + /* So that link locals have meaning */ +- if ((!sk_listener->sk_bound_dev_if || l3_slave) && ++ if (!sk_listener->sk_bound_dev_if && + ipv6_addr_type(&ireq->ir_v6_rmt_addr) & IPV6_ADDR_LINKLOCAL) + ireq->ir_iif = tcp_v6_iif(skb); + +-- +2.20.1 + diff --git a/queue-4.14/revert-vrf-mark-skb-for-multicast-or-link-local-as-e.patch b/queue-4.14/revert-vrf-mark-skb-for-multicast-or-link-local-as-e.patch new file mode 100644 index 00000000000..078da463cfb --- /dev/null +++ b/queue-4.14/revert-vrf-mark-skb-for-multicast-or-link-local-as-e.patch @@ -0,0 +1,55 @@ +From 84fa7516f48ef8589e1a25ad4a48add68cdf73ce Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 23 Mar 2020 16:21:31 -0400 +Subject: Revert "vrf: mark skb for multicast or link-local as enslaved to VRF" + +This reverts commit 2271c9500434af2a26b2c9eadeb3c0b075409fb5. + +This patch shouldn't have been backported to 4.14. + +Signed-off-by: Sasha Levin +--- + drivers/net/vrf.c | 19 ++++++++++--------- + 1 file changed, 10 insertions(+), 9 deletions(-) + +diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c +index e0cea5c05f0e2..03e4fcdfeab73 100644 +--- a/drivers/net/vrf.c ++++ b/drivers/net/vrf.c +@@ -996,23 +996,24 @@ static struct sk_buff *vrf_ip6_rcv(struct net_device *vrf_dev, + struct sk_buff *skb) + { + int orig_iif = skb->skb_iif; +- bool need_strict = rt6_need_strict(&ipv6_hdr(skb)->daddr); +- bool is_ndisc = ipv6_ndisc_frame(skb); ++ bool need_strict; + +- /* loopback, multicast & non-ND link-local traffic; do not push through +- * packet taps again. Reset pkt_type for upper layers to process skb ++ /* loopback traffic; do not push through packet taps again. ++ * Reset pkt_type for upper layers to process skb + */ +- if (skb->pkt_type == PACKET_LOOPBACK || (need_strict && !is_ndisc)) { ++ if (skb->pkt_type == PACKET_LOOPBACK) { + skb->dev = vrf_dev; + skb->skb_iif = vrf_dev->ifindex; + IP6CB(skb)->flags |= IP6SKB_L3SLAVE; +- if (skb->pkt_type == PACKET_LOOPBACK) +- skb->pkt_type = PACKET_HOST; ++ skb->pkt_type = PACKET_HOST; + goto out; + } + +- /* if packet is NDISC then keep the ingress interface */ +- if (!is_ndisc) { ++ /* if packet is NDISC or addressed to multicast or link-local ++ * then keep the ingress interface ++ */ ++ need_strict = rt6_need_strict(&ipv6_hdr(skb)->daddr); ++ if (!ipv6_ndisc_frame(skb) && !need_strict) { + vrf_rx_stats(vrf_dev, skb->len); + skb->dev = vrf_dev; + skb->skb_iif = vrf_dev->ifindex; +-- +2.20.1 + diff --git a/queue-4.14/series b/queue-4.14/series index 7378958d1c2..86eff6d2779 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -42,3 +42,5 @@ usb-cdc-acm-fix-rounding-error-in-tiocsserial.patch iio-adc-at91-sama5d2_adc-fix-channel-configuration-f.patch iio-adc-at91-sama5d2_adc-fix-differential-channels-i.patch kbuild-disable-wpointer-to-enum-cast.patch +revert-vrf-mark-skb-for-multicast-or-link-local-as-e.patch +revert-ipv6-fix-handling-of-lla-with-vrf-and-sockets.patch