diff options
author | David S. Miller <davem@davemloft.net> | 2009-06-09 03:20:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-09 03:20:05 -0400 |
commit | 4d9092bb41c8fdca45513461587d8b4ad3918f74 (patch) | |
tree | 38c8972be346a5f60b960acb61048e72808fc7cc /net/ipv6 | |
parent | d7fcf1a5cae2c970e9afe7192fe0c13d931247e0 (diff) |
ipv6: Use frag list abstraction interfaces.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/ip6_output.c | 6 | ||||
-rw-r--r-- | net/ipv6/reassembly.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index c8dc8e5a822f..db6c7224a862 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -658,7 +658,7 @@ static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)) | |||
658 | } | 658 | } |
659 | mtu -= hlen + sizeof(struct frag_hdr); | 659 | mtu -= hlen + sizeof(struct frag_hdr); |
660 | 660 | ||
661 | if (skb_shinfo(skb)->frag_list) { | 661 | if (skb_has_frags(skb)) { |
662 | int first_len = skb_pagelen(skb); | 662 | int first_len = skb_pagelen(skb); |
663 | int truesizes = 0; | 663 | int truesizes = 0; |
664 | 664 | ||
@@ -667,7 +667,7 @@ static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)) | |||
667 | skb_cloned(skb)) | 667 | skb_cloned(skb)) |
668 | goto slow_path; | 668 | goto slow_path; |
669 | 669 | ||
670 | for (frag = skb_shinfo(skb)->frag_list; frag; frag = frag->next) { | 670 | skb_walk_frags(skb, frag) { |
671 | /* Correct geometry. */ | 671 | /* Correct geometry. */ |
672 | if (frag->len > mtu || | 672 | if (frag->len > mtu || |
673 | ((frag->len & 7) && frag->next) || | 673 | ((frag->len & 7) && frag->next) || |
@@ -690,7 +690,7 @@ static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)) | |||
690 | err = 0; | 690 | err = 0; |
691 | offset = 0; | 691 | offset = 0; |
692 | frag = skb_shinfo(skb)->frag_list; | 692 | frag = skb_shinfo(skb)->frag_list; |
693 | skb_shinfo(skb)->frag_list = NULL; | 693 | skb_frag_list_init(skb); |
694 | /* BUILD HEADER */ | 694 | /* BUILD HEADER */ |
695 | 695 | ||
696 | *prevhdr = NEXTHDR_FRAGMENT; | 696 | *prevhdr = NEXTHDR_FRAGMENT; |
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c index 54a387d31e1a..2642a41a8535 100644 --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c | |||
@@ -494,7 +494,7 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *prev, | |||
494 | /* If the first fragment is fragmented itself, we split | 494 | /* If the first fragment is fragmented itself, we split |
495 | * it to two chunks: the first with data and paged part | 495 | * it to two chunks: the first with data and paged part |
496 | * and the second, holding only fragments. */ | 496 | * and the second, holding only fragments. */ |
497 | if (skb_shinfo(head)->frag_list) { | 497 | if (skb_has_frags(head)) { |
498 | struct sk_buff *clone; | 498 | struct sk_buff *clone; |
499 | int i, plen = 0; | 499 | int i, plen = 0; |
500 | 500 | ||
@@ -503,7 +503,7 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *prev, | |||
503 | clone->next = head->next; | 503 | clone->next = head->next; |
504 | head->next = clone; | 504 | head->next = clone; |
505 | skb_shinfo(clone)->frag_list = skb_shinfo(head)->frag_list; | 505 | skb_shinfo(clone)->frag_list = skb_shinfo(head)->frag_list; |
506 | skb_shinfo(head)->frag_list = NULL; | 506 | skb_frag_list_init(head); |
507 | for (i=0; i<skb_shinfo(head)->nr_frags; i++) | 507 | for (i=0; i<skb_shinfo(head)->nr_frags; i++) |
508 | plen += skb_shinfo(head)->frags[i].size; | 508 | plen += skb_shinfo(head)->frags[i].size; |
509 | clone->len = clone->data_len = head->data_len - plen; | 509 | clone->len = clone->data_len = head->data_len - plen; |