• Hideaki Yoshifuji's avatar
    [IPV4/IPV6]: Fix fragment creation. · 68426377
    Hideaki Yoshifuji authored
    We have two problem in ipv4 and ipv6 wrt. to
    fragmentation on output.  Both of which result
    in fragmentation when it is really not needed.
    
    When fragmenting both ipv4 and ipv6 need to make
    the post IP-header portion of the packet have a
    length of modulo 8.  This means that if the PMTU
    is not a multiple of 8 after the IP header size
    is subtracted, we will fragment for full sized
    frames for the modulo 8 bytes.
    
    Furthermore, IPV6 subtracts out space for the
    fragmentation header it must add, making unnecessary
    fragmentation even more likely.
    
    We still need to handle ip*_append_page() and that
    will happen in a followup fix.
    Signed-off-by: default avatarHideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    68426377
ip6_output.c 28.7 KB