aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-03-13 12:51:52 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:25:17 -0400
commit967b05f64e27d04a4c8879addd0e1c52137e2c9e (patch)
treec2c7ab3f0284903222d6d0864deaedbd4766b9b8 /net/ipv6
parentea2ae17d6443abddc79480dc9f7af8feacabddc4 (diff)
[SK_BUFF]: Introduce skb_set_transport_header
For the cases where the transport header is being set to a offset from skb->data. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/ah6.c2
-rw-r--r--net/ipv6/esp6.c4
-rw-r--r--net/ipv6/netfilter/nf_conntrack_reasm.c2
-rw-r--r--net/ipv6/xfrm6_mode_beet.c2
-rw-r--r--net/ipv6/xfrm6_mode_ro.c2
-rw-r--r--net/ipv6/xfrm6_mode_transport.c2
6 files changed, 7 insertions, 7 deletions
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c
index b682d2368c2a..e5ee981d3e10 100644
--- a/net/ipv6/ah6.c
+++ b/net/ipv6/ah6.c
@@ -247,7 +247,7 @@ static int ah6_output(struct xfrm_state *x, struct sk_buff *skb)
247 memcpy(tmp_base, top_iph, sizeof(tmp_base)); 247 memcpy(tmp_base, top_iph, sizeof(tmp_base));
248 248
249 tmp_ext = NULL; 249 tmp_ext = NULL;
250 extlen = skb->h.raw - (unsigned char *)(top_iph + 1); 250 extlen = skb_transport_offset(skb) + sizeof(struct ipv6hdr);
251 if (extlen) { 251 if (extlen) {
252 extlen += sizeof(*tmp_ext); 252 extlen += sizeof(*tmp_ext);
253 tmp_ext = kmalloc(extlen, GFP_ATOMIC); 253 tmp_ext = kmalloc(extlen, GFP_ATOMIC);
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c
index 35905867ded1..ad522b7b5771 100644
--- a/net/ipv6/esp6.c
+++ b/net/ipv6/esp6.c
@@ -228,8 +228,8 @@ static int esp6_input(struct xfrm_state *x, struct sk_buff *skb)
228 ret = nexthdr[1]; 228 ret = nexthdr[1];
229 } 229 }
230 230
231 skb->h.raw = __skb_pull(skb, sizeof(*esph) + esp->conf.ivlen) - hdr_len; 231 __skb_pull(skb, sizeof(*esph) + esp->conf.ivlen);
232 232 skb_set_transport_header(skb, -hdr_len);
233out: 233out:
234 return ret; 234 return ret;
235} 235}
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
index 75138cf1fa61..015950522c8b 100644
--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
@@ -785,7 +785,7 @@ struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb)
785 goto ret_orig; 785 goto ret_orig;
786 } 786 }
787 787
788 clone->h.raw = clone->data + fhoff; 788 skb_set_transport_header(clone, fhoff);
789 hdr = ipv6_hdr(clone); 789 hdr = ipv6_hdr(clone);
790 fhdr = (struct frag_hdr *)clone->h.raw; 790 fhdr = (struct frag_hdr *)clone->h.raw;
791 791
diff --git a/net/ipv6/xfrm6_mode_beet.c b/net/ipv6/xfrm6_mode_beet.c
index b5a48c255f07..abac09409ded 100644
--- a/net/ipv6/xfrm6_mode_beet.c
+++ b/net/ipv6/xfrm6_mode_beet.c
@@ -42,7 +42,7 @@ static int xfrm6_beet_output(struct xfrm_state *x, struct sk_buff *skb)
42 42
43 hdr_len = ip6_find_1stfragopt(skb, &prevhdr); 43 hdr_len = ip6_find_1stfragopt(skb, &prevhdr);
44 skb->nh.raw = prevhdr - x->props.header_len; 44 skb->nh.raw = prevhdr - x->props.header_len;
45 skb->h.raw = skb->data + hdr_len; 45 skb_set_transport_header(skb, hdr_len);
46 memmove(skb->data, iph, hdr_len); 46 memmove(skb->data, iph, hdr_len);
47 47
48 skb_reset_network_header(skb); 48 skb_reset_network_header(skb);
diff --git a/net/ipv6/xfrm6_mode_ro.c b/net/ipv6/xfrm6_mode_ro.c
index d01958d921ac..da48ecf3fe96 100644
--- a/net/ipv6/xfrm6_mode_ro.c
+++ b/net/ipv6/xfrm6_mode_ro.c
@@ -54,7 +54,7 @@ static int xfrm6_ro_output(struct xfrm_state *x, struct sk_buff *skb)
54 54
55 hdr_len = x->type->hdr_offset(x, skb, &prevhdr); 55 hdr_len = x->type->hdr_offset(x, skb, &prevhdr);
56 skb->nh.raw = prevhdr - x->props.header_len; 56 skb->nh.raw = prevhdr - x->props.header_len;
57 skb->h.raw = skb->data + hdr_len; 57 skb_set_transport_header(skb, hdr_len);
58 memmove(skb->data, iph, hdr_len); 58 memmove(skb->data, iph, hdr_len);
59 return 0; 59 return 0;
60} 60}
diff --git a/net/ipv6/xfrm6_mode_transport.c b/net/ipv6/xfrm6_mode_transport.c
index cae6cacd58c4..0134d74ef087 100644
--- a/net/ipv6/xfrm6_mode_transport.c
+++ b/net/ipv6/xfrm6_mode_transport.c
@@ -36,7 +36,7 @@ static int xfrm6_transport_output(struct xfrm_state *x, struct sk_buff *skb)
36 36
37 hdr_len = x->type->hdr_offset(x, skb, &prevhdr); 37 hdr_len = x->type->hdr_offset(x, skb, &prevhdr);
38 skb->nh.raw = prevhdr - x->props.header_len; 38 skb->nh.raw = prevhdr - x->props.header_len;
39 skb->h.raw = skb->data + hdr_len; 39 skb_set_transport_header(skb, hdr_len);
40 memmove(skb->data, iph, hdr_len); 40 memmove(skb->data, iph, hdr_len);
41 return 0; 41 return 0;
42} 42}