ipv6: Change skb->data before using icmpv6_notify() to propagate redirect

In function ndisc_redirect_rcv(), the skb->data points to the transport
header, but function icmpv6_notify() need the skb->data points to the
inner IP packet. So before using icmpv6_notify() to propagate redirect,
change skb->data to point the inner IP packet that triggered the sending
of the Redirect, and introduce struct rd_msg to make it easy.

Signed-off-by: Duan Jiong <djduanjiong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Duan Jiong
2012-12-14 02:59:59 +00:00
committed by David S. Miller
parent 1e9f954516
commit 093d04d42f
2 changed files with 24 additions and 0 deletions

View File

@@ -78,6 +78,13 @@ struct ra_msg {
__be32 retrans_timer;
};
struct rd_msg {
struct icmp6hdr icmph;
struct in6_addr target;
struct in6_addr dest;
__u8 opt[0];
};
struct nd_opt_hdr {
__u8 nd_opt_type;
__u8 nd_opt_len;