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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user