Skip to content
  • Pablo Neira Ayuso's avatar
    net: ipv6: split skbuff into fragments transformer · 8a6a1f17
    Pablo Neira Ayuso authored
    
    
    This patch exposes a new API to refragment a skbuff. This allows you to
    split either a linear skbuff or to force the refragmentation of an
    existing fraglist using a different mtu. The API consists of:
    
    * ip6_frag_init(), that initializes the internal state of the transformer.
    * ip6_frag_next(), that allows you to fetch the next fragment. This function
      internally allocates the skbuff that represents the fragment, it pushes
      the IPv6 header, and it also copies the payload for each fragment.
    
    The ip6_frag_state object stores the internal state of the splitter.
    
    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: default avatarPablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    8a6a1f17