ipv4: Pass original device to ip_rcv_finish_core
authorDavid Ahern <dsahern@gmail.com>
Mon, 25 Feb 2019 21:55:48 +0000 (13:55 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 Mar 2019 06:17:19 +0000 (07:17 +0100)
commitcc211561d12656dff6d73bc61094cb6366cac4e6
tree89ccb521302a25a0962e95986514ed93240e67a3
parent4f3221dee1e1230555cbf24c2d5907f470b5e10e
ipv4: Pass original device to ip_rcv_finish_core

[ Upstream commit a1fd1ad2552fad9e649eeb85fd79301e2880a886 ]

ip_route_input_rcu expects the original ingress device (e.g., for
proper multicast handling). The skb->dev can be changed by l3mdev_ip_rcv,
so dev needs to be saved prior to calling it. This was the behavior prior
to the listify changes.

Fixes: 5fa12739a53d0 ("net: ipv4: listify ip_rcv_finish")
Cc: Edward Cree <ecree@solarflare.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/ip_input.c