diff options
author | Harald Welte <laforge@gnumonks.org> | 2016-12-15 16:35:53 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-17 12:00:25 -0500 |
commit | d928be81b44dc3cad75d7a9f9fcbe99725dc7e56 (patch) | |
tree | f3cf4fe1fde1ad082570a5a27ab6edc399750ed9 | |
parent | 88edf10315c8d72db70d39f3851cf2c91abdb634 (diff) |
gtp: Fix initialization of Flags octet in GTPv1 header
When generating a GTPv1 header in gtp1_push_header(), initialize the
'reserved' bit to zero. All 3GPP specifications for GTPv1 from Release
99 through Release 13 agree that a transmitter shall set this bit to
zero, see e.g. Note 0 of Figure 2 in Section 6 of 3GPP TS 29.060 v13.5.0
Release 13, available from
http://www.etsi.org/deliver/etsi_ts/129000_129099/129060/13.05.00_60/ts_129060v130500p.pdf
Signed-off-by: Harald Welte <laforge@gnumonks.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/gtp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index 6031d499f2be..8b6810bad54b 100644 --- a/drivers/net/gtp.c +++ b/drivers/net/gtp.c | |||
@@ -423,11 +423,11 @@ static inline void gtp1_push_header(struct sk_buff *skb, struct pdp_ctx *pctx) | |||
423 | 423 | ||
424 | /* Bits 8 7 6 5 4 3 2 1 | 424 | /* Bits 8 7 6 5 4 3 2 1 |
425 | * +--+--+--+--+--+--+--+--+ | 425 | * +--+--+--+--+--+--+--+--+ |
426 | * |version |PT| 1| E| S|PN| | 426 | * |version |PT| 0| E| S|PN| |
427 | * +--+--+--+--+--+--+--+--+ | 427 | * +--+--+--+--+--+--+--+--+ |
428 | * 0 0 1 1 1 0 0 0 | 428 | * 0 0 1 1 1 0 0 0 |
429 | */ | 429 | */ |
430 | gtp1->flags = 0x38; /* v1, GTP-non-prime. */ | 430 | gtp1->flags = 0x30; /* v1, GTP-non-prime. */ |
431 | gtp1->type = GTP_TPDU; | 431 | gtp1->type = GTP_TPDU; |
432 | gtp1->length = htons(payload_len); | 432 | gtp1->length = htons(payload_len); |
433 | gtp1->tid = htonl(pctx->u.v1.o_tei); | 433 | gtp1->tid = htonl(pctx->u.v1.o_tei); |