mirror of
https://github.com/Dasharo/linux.git
synced 2026-03-06 15:25:10 -08:00
ipv4: Save nexthop address of LSRR/SSRR option to IPCB.
We can not update iph->daddr in ip_options_rcv_srr(), It is too early. When some exception ocurred later (eg. in ip_forward() when goto sr_failed) we need the ip header be identical to the original one as ICMP need it. Add a field 'nexthop' in struct ip_options to save nexthop of LSRR or SSRR option. Signed-off-by: Li Wei <lw@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -84,7 +84,7 @@ int ip_forward(struct sk_buff *skb)
|
||||
|
||||
rt = skb_rtable(skb);
|
||||
|
||||
if (opt->is_strictroute && ip_hdr(skb)->daddr != rt->rt_gateway)
|
||||
if (opt->is_strictroute && opt->nexthop != rt->rt_gateway)
|
||||
goto sr_failed;
|
||||
|
||||
if (unlikely(skb->len > dst_mtu(&rt->dst) && !skb_is_gso(skb) &&
|
||||
|
||||
Reference in New Issue
Block a user