vrf: check forwarding on the original netdevice when generating ICMP dest unreachable
authorStephen Suryaputra <ssuryaextr@gmail.com>
Wed, 28 Feb 2018 17:20:44 +0000 (12:20 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 Mar 2018 02:40:22 +0000 (21:40 -0500)
commite2c0dc1f1d8e31eabed412b6f154ad549986bc28
tree622fa812bb38c1729e1b7b6179dfb03c91991791
parent50d629e7a843d1635ecb1658335279503c4ec9a8
vrf: check forwarding on the original netdevice when generating ICMP dest unreachable

When ip_error() is called the device is the l3mdev master instead of the
original device. So the forwarding check should be on the original one.

Changes from v2:
- Handle the original device disappearing (per David Ahern)
- Minimize the change in code order

Changes from v1:
- Only need to reset the device on which __in_dev_get_rcu() is done (per
  David Ahern).

Signed-off-by: Stephen Suryaputra <ssuryaextr@gmail.com>
Acked-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/route.c