diff options
author | Li Wei <lw@cn.fujitsu.com> | 2011-11-22 23:33:10 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-29 16:34:02 -0800 |
commit | 5805d4729059f578c8283ccc44021342fbe8c93d (patch) | |
tree | d962beed4be7d5689185cc2d465a7906dd82176e /include | |
parent | c4f2403478002bdb0a46a62f87909aeda8058d8b (diff) |
ipv4: Save nexthop address of LSRR/SSRR option to IPCB.
[ Upstream commit ac8a48106be49c422575ddc7531b776f8eb49610 ]
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/inet_sock.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index caaff5f5f39..14dd9c78992 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h @@ -31,6 +31,7 @@ /** struct ip_options - IP Options * * @faddr - Saved first hop address + * @nexthop - Saved nexthop address in LSRR and SSRR * @is_data - Options in __data, rather than skb * @is_strictroute - Strict source route * @srr_is_hit - Packet destination addr was our one @@ -41,6 +42,7 @@ */ struct ip_options { __be32 faddr; + __be32 nexthop; unsigned char optlen; unsigned char srr; unsigned char rr; |