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
This commit is contained in:
Harald Welte 2010-05-04 11:16:09 +02:00
parent 1b3e577017
commit cc9f083be0
1 changed files with 3 additions and 3 deletions

View File

@ -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);