summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@gnumonks.org>2014-02-19 16:18:09 +0100
committerPablo Neira Ayuso <pablo@gnumonks.org>2014-02-19 16:23:20 +0100
commitf33f89787beb79d3913eb9103b1af8105437f598 (patch)
tree4ddae53431766b4c075a338ce6294e23a280d547
parent6deca6ceded27ca28a79d190ca2f90f71d27f8b1 (diff)
gtp: fix wrong version in header
v1 is 001 (as interpreted in binary), not 0001 (which is interpreted as v0.
-rw-r--r--gtp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gtp.c b/gtp.c
index 8a86a8d..8f0fa36 100644
--- a/gtp.c
+++ b/gtp.c
@@ -462,10 +462,14 @@ gtp1_push_header(struct sk_buff *skb, struct pdp_ctx *pctx, int payload_len)
skb_cow(skb, sizeof(*gtp1) + IP_UDP_LEN);
gtp1 = (struct gtp1_header *) skb_push(skb, sizeof(*gtp1));
- gtp1->flags = 0x10; /* V1, GTP-non-prime */
+ gtp1->flags = 0x20; /* V1, GTP-non-prime */
gtp1->type = GTP_TPDU;
gtp1->length = htons(payload_len);
gtp1->tid = htonl((u32)pctx->tid);
+
+ /* TODO: Suppport for extension header, sequence number and N-PDU.
+ * Update the length field if any of them is available.
+ */
}
/* From Linux kernel 3.13: iptunnel_xmit_stats() */