]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit04d4f9397ba3aca823e716c0596775d3891f1584
treec4f8ffda52e1fa30489d1eae8c7f4066c0fc2df6
parentb2088aab5e304fbe3290e690b8dba01d84189101
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