aboutsummaryrefslogtreecommitdiffstats
path: root/gtp
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-05-04 11:16:09 +0200
committerHarald Welte <laforge@gnumonks.org>2010-05-04 11:16:09 +0200
commitcc9f083be02c68377657b02aac67291e88591e44 (patch)
treefa1f78459d20d25f94b3532b76b0d40eb2145d04 /gtp
parent1b3e57701744ac33878fa129c087c1798fee4936 (diff)
sgsnemu: delete pdp context - teardown must be before NSAPI
in front of Cisco and Alcatel GGSN's, we meet the following error : 5 packets transmitted Disconnecting PDP context #0 openggsn[24940]: gtp.c: 2417: Unexpected cause value received: 193. Packet from 172.29.5.130:2123, length: 14, content: 32 15 00 06 00 00 00 01 04 02 00 00 01 c1 it is because in the sgsnemu requests packet, the teardown field is after the NSAPI field : No. Time Source Destination Protocol Info 24 10.940094 172.21.5.1 172.29.5.130 GTP Delete PDP context request Frame 24 (58 bytes on wire, 58 bytes captured) Ethernet II, Src: HewlettP_55:23:8d (00:11:0a:55:23:8d), Dst: Alcatel-_f6:8e:32 (00:d0:95:f6:8e:32) Internet Protocol, Src: 172.21.5.1 (172.21.5.1), Dst: 172.29.5.130 (172.29.5.130) User Datagram Protocol, Src Port: gtp-control (2123), Dst Port: gtp-control (2123) GPRS Tunneling Protocol Flags: 0x32 Message Type: Delete PDP context request (0x14) Length: 8 TEID: 0x00000739 Sequence number: 0xbc02 N-PDU Number: 0x00 Next extension header type: No more extension headers (0x00) [--- end of GTP header, beginning of extension headers ---] NSAPI: 0 Teardown Indicator: True [Response In: 25] Taken from http://sourceforge.net/tracker/index.php?func=detail&aid=2865662&group_id=68956&atid=522957
Diffstat (limited to 'gtp')
-rw-r--r--gtp/gtp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gtp/gtp.c b/gtp/gtp.c
index d33a1ff..6d567ff 100644
--- a/gtp/gtp.c
+++ b/gtp/gtp.c
@@ -2210,12 +2210,12 @@ int gtp_delete_context_req(struct gsn_t *gsn, struct pdp_t *pdp, void *cbp,
}
if (pdp->version == 1) {
- gtpie_tv1(&packet, &length, GTP_MAX, GTPIE_NSAPI,
- pdp->nsapi);
-
if (teardown)
gtpie_tv1(&packet, &length, GTP_MAX, GTPIE_TEARDOWN,
0xff);
+
+ gtpie_tv1(&packet, &length, GTP_MAX, GTPIE_NSAPI,
+ pdp->nsapi);
}
gtp_req(gsn, pdp->version, pdp, &packet, length, &addr, cbp);