• Gao feng's avatar
    ipv6: fix incorrect ipsec fragment · 0c183379
    Gao feng authored
    Since commit ad0081e4
    "ipv6: Fragment locally generated tunnel-mode IPSec6 packets as needed"
    the fragment of packets is incorrect.
    because tunnel mode needs IPsec headers and trailer for all fragments,
    while on transport mode it is sufficient to add the headers to the
    first fragment and the trailer to the last.
    
    so modify mtu and maxfraglen base on ipsec mode and if fragment is first
    or last.
    
    with my test,it work well(every fragment's size is the mtu)
    and does not trigger slow fragment path.
    
    Changes from v1:
    	though optimization, mtu_prev and maxfraglen_prev can be delete.
    	replace xfrm mode codes with dst_entry's new frag DST_XFRM_TUNNEL.
    	add fuction ip6_append_data_mtu to make codes clearer.
    Signed-off-by: 's avatarGao feng <gaofeng@cn.fujitsu.com>
    Signed-off-by: 's avatarDavid S. Miller <davem@davemloft.net>
    0c183379
Name
Last commit
Last update
..
Kconfig Loading commit data...
Makefile Loading commit data...
xfrm_algo.c Loading commit data...
xfrm_hash.c Loading commit data...
xfrm_hash.h Loading commit data...
xfrm_input.c Loading commit data...
xfrm_ipcomp.c Loading commit data...
xfrm_output.c Loading commit data...
xfrm_policy.c Loading commit data...
xfrm_proc.c Loading commit data...
xfrm_replay.c Loading commit data...
xfrm_state.c Loading commit data...
xfrm_sysctl.c Loading commit data...
xfrm_user.c Loading commit data...