• Herbert Xu's avatar
    tun: Fix csum_start with VLAN acceleration · a8f9bfdf
    Herbert Xu authored
    When VLAN acceleration is in use on the xmit path, we end up
    setting csum_start to the wrong place.  The result is that the
    whoever ends up doing the checksum setting will corrupt the packet
    instead of writing the checksum to the expected location, usually
    this means writing the checksum with an offset of -4.
    
    This patch fixes this by adjusting csum_start when VLAN acceleration
    is detected.
    
    Fixes: 6680ec68 ("tuntap: hardware vlan tx support")
    Cc: stable@vger.kernel.org
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a8f9bfdf
tun.c 55.7 KB