]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: Save nexthop address of LSRR/SSRR option to IPCB.
authorLi Wei <lw@cn.fujitsu.com>
Tue, 22 Nov 2011 23:33:10 +0000 (23:33 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 24 Nov 2011 00:19:32 +0000 (19:19 -0500)
commitf2e57a32fda678d49aa17300588b40505426f98d
treed770975ffc9cebfcbb2d3ad40b0601a8d1e77c32
parentc4086021486a476231906b95b7e9dfb5f37b137a
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>
include/net/inet_sock.h
net/ipv4/ip_forward.c
net/ipv4/ip_options.c