ipv4: reset rt_iif for recirculated mcast/bcast out pkts
authorStephen Suryaputra <ssuryaextr@gmail.com>
Wed, 26 Jun 2019 06:21:16 +0000 (02:21 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Jun 2019 19:40:10 +0000 (12:40 -0700)
commit5b18f1289808fee5d04a7e6ecf200189f41a4db6
treec4f8ffda52e1fa30489d1eae8c7f4066c0fc2df6
parentee4297420d56a0033a8593e80b33fcc93fda8509
ipv4: reset rt_iif for recirculated mcast/bcast out pkts

Multicast or broadcast egress packets have rt_iif set to the oif. These
packets might be recirculated back as input and lookup to the raw
sockets may fail because they are bound to the incoming interface
(skb_iif). If rt_iif is not zero, during the lookup, inet_iif() function
returns rt_iif instead of skb_iif. Hence, the lookup fails.

v2: Make it non vrf specific (David Ahern). Reword the changelog to
    reflect it.
Signed-off-by: Stephen Suryaputra <ssuryaextr@gmail.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/route.h
net/ipv4/ip_output.c
net/ipv4/route.c