mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-01 10:33:27 +00:00
ipv4: fix forwarding for strict source routes
After the change "Adjust semantics of rt->rt_gateway"
(commit f8126f1d51
) rt_gateway can be 0 but ip_forward() compares
it directly with nexthop. What we want here is to check if traffic
is to directly connected nexthop and to fail if using gateway.
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e81da0e113
commit
e0adef0f74
1 changed files with 1 additions and 1 deletions
|
@ -85,7 +85,7 @@ int ip_forward(struct sk_buff *skb)
|
|||
|
||||
rt = skb_rtable(skb);
|
||||
|
||||
if (opt->is_strictroute && opt->nexthop != rt->rt_gateway)
|
||||
if (opt->is_strictroute && rt->rt_gateway)
|
||||
goto sr_failed;
|
||||
|
||||
if (unlikely(skb->len > dst_mtu(&rt->dst) && !skb_is_gso(skb) &&
|
||||
|
|
Loading…
Reference in a new issue