• Xin Long's avatar
    cipso_ipv4: use iph_set_totlen in skbuff_setattr · 7eb072be
    Xin Long authored
    It may process IPv4 TCP GSO packets in cipso_v4_skbuff_setattr(), so
    the iph->tot_len update should use iph_set_totlen().
    
    Note that for these non GSO packets, the new iph tot_len with extra
    iph option len added may become greater than 65535, the old process
    will cast it and set iph->tot_len to it, which is a bug. In theory,
    iph options shouldn't be added for these big packets in here, a fix
    may be needed here in the future. For now this patch is only to set
    iph->tot_len to 0 when it happens.
    Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
    Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    7eb072be
cipso_ipv4.c 61 KB