Hello.
sgsnemu cannot establish PDP context with latest Cisco GGSN. There is additional information element "Bearer control mode" sent by GGSN in create PDP context response message (attachment). This information element is not recognized by sgsnemu.
Here are the changes in libgtp to support this information element:
9 gtp/gtpie.c @@ -243,7 +243,8 @@ int gtpie_decaps(union gtpie_member *ie[], int version, void *pack, case GTPIE_RP_SMS: case GTPIE_RP: case GTPIE_MS_NOT_REACH: - if (j < GTPIE_SIZE) { + case GTPIE_BCM: + if (j < GTPIE_SIZE) { ie[j] = (union gtpie_member *)p; if (GTPIE_DEBUG) printf @@ -457,7 +458,8 @@ int gtpie_encaps(union gtpie_member *ie[], void *pack, unsigned *len) case GTPIE_RP_SMS: case GTPIE_RP: case GTPIE_MS_NOT_REACH: - iesize = 2; + case GTPIE_BCM: + iesize = 2; break; case GTPIE_FL_DI: /* TV GTPIE types with value length 2 */ case GTPIE_FL_C: @@ -558,7 +560,8 @@ int gtpie_encaps2(union gtpie_member ie[], unsigned int size, case GTPIE_RP_SMS: case GTPIE_RP: case GTPIE_MS_NOT_REACH: - iesize = 2; + case GTPIE_BCM: + iesize = 2; break; case GTPIE_PFI: /* TV GTPIE types with value length 2 */ case GTPIE_CHARGING_C:
1 gtp/gtpie.h @@ -106,6 +106,7 @@ static __inline uint64_t hton64(uint64_t q) #define GTPIE_USER_LOC 152 /* User Location Information */ #define GTPIE_MS_TZ 153 /* MS Time Zone */ #define GTPIE_IMEI_SV 154 /* IMEI Software Version */ +#define GTPIE_BCM 184 /* Bearer control mode */ /* 239-250 Reserved for the GPRS charging protocol (see GTP' in GSM 12.15) */ #define GTPIE_CHARGING_ADDR 251 /* Charging Gateway Address */ /* 252-254 Reserved for the GPRS charging protocol (see GTP' in GSM 12.15) */
--
Thanks for your patch! It looks good in principle, but let's clarify some details.
I can't find the 'Bearer Control Mode' in the GTP spec I have here (ETSI TS 129 060 V6.9.0 (2005-06) / 3GPP TS 29.060 version 6.9.0 Release 6), so it looks like a vendor specific extension. You don't happen to have a spec on it?
Your patch includes some unwanted whitespace changes, it would be great to get rid of those. I'm marking them below:
On Tue, Sep 13, 2016 at 10:00:37AM +0200, BJovke . wrote:
- if (j < GTPIE_SIZE) {
- case GTPIE_BCM:
if (j < GTPIE_SIZE) {
The 'if (j...' line shouldn't change.
- iesize = 2;
- case GTPIE_BCM:
iesize = 2;
The iesize line shouldn't change. (x2)
In fact, those whitespace changes look weird, because in the upstream file version, the indenting you're apparently adding is already present.
It is easiest for us if you submit your patch using git send-email, or at least git format-patch, which also ensures that we get a commit log message and author information, and that the patch is based on our master HEAD.
It would be great if you could resolve these issues. Thanks again!
~Neels
Hello.
"Bearer control mode" is added in Release 7 as I am aware of. It's not vendor specific. You can check here: http://www.tech-invite.com/3m29/tinv-3gpp-29-060.html
"If Bearer Control Mode is provided by the GGSN in the PCO, the Bearer Control Mode IE shall be included in order to inform the SGSN about the bearer control mode and shall indicate the same bearer control mode as indicated to the MS in the PCO."
Wireshark (I'm using latest version) decodes this information element with no problem.
There's probably a method to select Release used by GGSN but the GGSN tests were done on is in a live mobile network and doing configuration changes on it is not an option.
I will make those changes in these files in a proper way so there's no confusion what is added and what is deleted (actually nothing is deleted). I will use git send-email/git format-patch. I suppose the e-mail to send is the same (osmocom-net-gprs@lists.osmocom.org)?
Greetings.
2016-09-14 0:43 GMT+02:00 Neels Hofmeyr nhofmeyr@sysmocom.de:
Thanks for your patch! It looks good in principle, but let's clarify some details.
I can't find the 'Bearer Control Mode' in the GTP spec I have here (ETSI TS 129 060 V6.9.0 (2005-06) / 3GPP TS 29.060 version 6.9.0 Release 6), so it looks like a vendor specific extension. You don't happen to have a spec on it?
Your patch includes some unwanted whitespace changes, it would be great to get rid of those. I'm marking them below:
On Tue, Sep 13, 2016 at 10:00:37AM +0200, BJovke . wrote:
- if (j < GTPIE_SIZE) {
- case GTPIE_BCM:
if (j < GTPIE_SIZE) {The 'if (j...' line shouldn't change.
- iesize = 2;
- case GTPIE_BCM:
iesize = 2;The iesize line shouldn't change. (x2)
In fact, those whitespace changes look weird, because in the upstream file version, the indenting you're apparently adding is already present.
It is easiest for us if you submit your patch using git send-email, or at least git format-patch, which also ensures that we get a commit log message and author information, and that the patch is based on our master HEAD.
It would be great if you could resolve these issues. Thanks again!
~Neels
--
- Neels Hofmeyr nhofmeyr@sysmocom.de http://www.sysmocom.de/
=======================================================================
- sysmocom - systems for mobile communications GmbH
- Alt-Moabit 93
- 10559 Berlin, Germany
- Sitz / Registered office: Berlin, HRB 134158 B
- Geschäftsführer / Managing Directors: Harald Welte
On Wed, Sep 14, 2016 at 02:11:53PM +0200, BJovke . wrote:
Hello.
"Bearer control mode" is added in Release 7 as I am aware of. It's not vendor specific. You can check here: http://www.tech-invite.com/3m29/tinv-3gpp-29-060.html
Ah, I was reading an outdated version. Thanks! http://www.etsi.org/deliver/etsi_ts/129000_129099/129060/13.05.00_60/ts_1290...
I will make those changes in these files in a proper way so there's no confusion what is added and what is deleted (actually nothing is deleted). I will use git send-email/git format-patch. I suppose the e-mail to send is the same (osmocom-net-gprs@lists.osmocom.org)?
Yes, it is. (Many osmo projects have moved to gerrit.osmocom.org submission, but OpenGGSN still works via the ML.) Thanks for your effort!
~Neels
osmocom-net-gprs@lists.osmocom.org