Hi,

We've found-out that (under certain conditions) the length field of the GTP-U header could have a wrong value (mostly when under load and usually with larger packets). I believe this is due to a race-condition in gtp_build_header (len may change between the push to skb and the actual writing of the len value in the header), which we have solved by saving the value of skb->len before pushing the header.

(Git patch is attached, hopefully in the right format -- an overkill for the fix itself)

static void gtp_build_header(struct sk_buff *skb,
const struct ip_tunnel_key *tun_key)
{
    struct gtphdr *gtph;

    int len = htons(skb->len);
gtph = (struct gtphdr *)__skb_push(skb, sizeof(struct gtphdr));

(...)

    gtph->total_length = len;
    gtph->teid = htonl(be64_to_cpu(tun_key->tun_id));
}

Best regards,
Vitor Cunha
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to