[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f0a47b5d-6477-9a6a-cf5d-6e13f0b4acdc@gmail.com>
Date: Tue, 25 Jun 2019 14:22:37 -0600
From: David Ahern <dsahern@...il.com>
To: Stephen Suryaputra <ssuryaextr@...il.com>, netdev@...r.kernel.org
Subject: Re: [PATCH net] vrf: reset rt_iif for recirculated mcast out pkts
On 6/25/19 4:33 AM, Stephen Suryaputra wrote:
> @@ -363,10 +376,20 @@ int ip_mc_output(struct net *net, struct sock *sk, struct sk_buff *skb)
> #endif
> ) {
> struct sk_buff *newskb = skb_clone(skb, GFP_ATOMIC);
> - if (newskb)
> + if (newskb) {
> + /* Reset rt_iif so that inet_iif() will return
> + * skb->dev->ifIndex which is the VRF device for
> + * socket lookup. Setting this to VRF ifindex
> + * causes ipi_ifindex in in_pktinfo to be
> + * overwritten, see ipv4_pktinfo_prepare().
> + */
> + if (netif_is_l3_slave(dev))
seems like the rt_iif is a problem for recirculated mcast packets in
general, not just ones tied to a VRF.
> + ip_mc_reset_rt_iif(net, rt, newskb);
> +
> NF_HOOK(NFPROTO_IPV4, NF_INET_POST_ROUTING,
> net, sk, newskb, NULL, newskb->dev,
> ip_mc_finish_output);
> + }
> }
>
> /* Multicasts with ttl 0 must not go beyond the host */
Powered by blists - more mailing lists