summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSasha Levin <sashal@kernel.org>2020-03-23 16:19:51 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-25 08:06:14 +0100
commitae2f7c84371a2a4c449a92c956d0e4f83565e257 (patch)
tree60cdb5788a2eef50e7536fddd29fae51f377f732
parent17a8ca79a576972c5a2050ad6eba21a2024799a6 (diff)
Revert "vrf: mark skb for multicast or link-local as enslaved to VRF"
This reverts commit 91c5f99d131ed3b231aaef7d4ed6799085b095a3. This patch shouldn't have been backported to 4.19. Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/net/vrf.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
index 7f5ee6bb4430..9f895083bc0a 100644
--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -993,23 +993,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;