summaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-03-10 19:57:15 -0300
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-25 22:24:54 -0700
commit1ced98e81d1c2f1ce965ecf8d0032e02ffa07bf0 (patch)
tree135955ffd557808f97aeb126efde39f8eeaeefbf /net/sctp
parent8856dfa3e9b71ac2177016f66ace3a8978afecc1 (diff)
downloadop-kernel-dev-1ced98e81d1c2f1ce965ecf8d0032e02ffa07bf0.zip
op-kernel-dev-1ced98e81d1c2f1ce965ecf8d0032e02ffa07bf0.tar.gz
[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>
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/ipv6.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
index 0b9c49b..5f9b145 100644
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -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. */
OpenPOWER on IntegriCloud