]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipv6: add skbuff fraglist splitter
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 29 May 2019 11:25:32 +0000 (13:25 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 May 2019 21:18:17 +0000 (14:18 -0700)
commit784e54f74429f6617880523d626076db0eea24bd
tree0ac64bce8eb6ed61978c95393c7abe23ea710f99
parent69a650fe86c199461792e6f0f769b4f1ef4b90fe
net: ipv6: add skbuff fraglist splitter

This patch adds the skbuff fraglist split iterator. This API provides an
iterator to transform the fraglist into single skbuff objects, it
consists of:

* ip6_fraglist_init(), that initializes the internal state of the
  fraglist iterator.
* ip6_fraglist_prepare(), that restores the IPv6 header on the fragment.
* ip6_fraglist_next(), that retrieves the fragment from the fraglist and
  updates the internal state of the iterator to point to the next
  fragment in the fraglist.

The ip6_fraglist_iter object stores the internal state of the iterator.

This code has been extracted from ip6_fragment(). Symbols are also
exported to allow to reuse this iterator from the bridge codepath to
build its own refragmentation routine by reusing the existing codebase.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ipv6.h
net/ipv6/ip6_output.c