[SK_BUFF] ipv6: More skb_reset_network_header conversions related to skb_pull
Now related to this form: skb->nh.ipv6h = (struct ipv6hdr *)skb_put(skb, length); That, as the others, is done when skb->tail is still equal to skb->data, making the conversion to skb_reset_network_header possible. Also one more case equivalent to skb->nh.raw = skb->data, of this form: iph = (struct ipv6hdr *)skb->data; <SNIP> skb->nh.ipv6h = iph; Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
8856dfa3e9
commit
1ced98e81d
@@ -122,7 +122,6 @@ SCTP_STATIC void sctp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
|
||||
int type, int code, int offset, __be32 info)
|
||||
{
|
||||
struct inet6_dev *idev;
|
||||
struct ipv6hdr *iph = (struct ipv6hdr *)skb->data;
|
||||
struct sctphdr *sh = (struct sctphdr *)(skb->data + offset);
|
||||
struct sock *sk;
|
||||
struct sctp_association *asoc;
|
||||
@@ -136,7 +135,7 @@ SCTP_STATIC void sctp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
|
||||
/* Fix up skb to look at the embedded net header. */
|
||||
saveip = skb->nh.raw;
|
||||
savesctp = skb->h.raw;
|
||||
skb->nh.ipv6h = iph;
|
||||
skb_reset_network_header(skb);
|
||||
skb->h.raw = (char *)sh;
|
||||
sk = sctp_err_lookup(AF_INET6, skb, sh, &asoc, &transport);
|
||||
/* Put back, the original pointers. */
|
||||
|
Reference in New Issue
Block a user