vrf: check accept_source_route on the original netdevice
authorStephen Suryaputra <ssuryaextr@gmail.com>
Mon, 1 Apr 2019 13:17:32 +0000 (09:17 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Apr 2019 06:37:48 +0000 (08:37 +0200)
commit16b7142372d82cb93099e050559967517b84ac6a
treea4e42ec9e40c5ea98d5a9802ad60c14d84906cd6
parent2ff8616e56d41bffef7408c896d58097e0669fc8
vrf: check accept_source_route on the original netdevice

[ Upstream commit 8c83f2df9c6578ea4c5b940d8238ad8a41b87e9e ]

Configuration check to accept source route IP options should be made on
the incoming netdevice when the skb->dev is an l3mdev master. The route
lookup for the source route next hop also needs the incoming netdev.

v2->v3:
- Simplify by passing the original netdevice down the stack (per David
  Ahern).

Signed-off-by: Stephen Suryaputra <ssuryaextr@gmail.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/net/ip.h
net/ipv4/ip_input.c
net/ipv4/ip_options.c