[ovs-dev] [PATCH v1] Basic GTP-U tunnel implementation in ovs
Vitor Cunha
vitorcunha at av.it.pt
Mon May 23 14:03:03 UTC 2016
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
More information about the dev
mailing list