Change in osmo-ggsn[master]: ggsn: Add minimalistic PAP support

Pau Espin Pedrol gerrit-no-reply at
Thu Apr 11 19:57:42 UTC 2019

Pau Espin Pedrol has posted comments on this change. ( )

Change subject: ggsn: Add minimalistic PAP support

Patch Set 3: Code-Review-1


-1 because it should be ntohs.
Commit Message:
PS3, Line 12: all, without actually checking any credentials database.
So the MS is expected to send inside PAP the values you configure your APN with? (the User+Password fields in the APN menu of android phones).
File ggsn/ggsn.c:
PS3, Line 511: "Welcome to OsmoGGSN"
> btw, I think this will be an easy way to figure out remotely if somebody is using OsmoGGSN or not: S […]
If it was AGPL then it'd be funny answering that in osmo-sgsn with a message "go free you code!" and a copy of the license ;)
PS3, Line 518: 	unsigned int pap_welcome_len = strlen(pap_welcome);
"ARRAY_SIZE(pap_welcome) -1" would make sense too :)
PS3, Line 519: 	uint8_t pap_out_size = sizeof(struct pap_element) + 1 + pap_welcome_len;
Is that +1 for the NULL chat of pap_welcome? please add comment (and add +1 to the end).
PS3, Line 520: 	struct pap_element *pap_out = alloca(pap_out_size);
nice, didn't know about alloca()
PS3, Line 526: 	if (htons(pap_in->len) > pco_in->length)
is htons() fine alignment-access wise?
And actually it should be ntohs.
PS3, Line 531: 		peer_id_len = pap_in->data[0];
I think you are not covering case sizeof(*pap_in) == ntohs(pap_in->len), that is, pap_in->data is empty. In that case you shoul avoid accessing pap_in->data and returning broken.

To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I81875f30f9f1497199253497f84718510747f731
Gerrit-Change-Number: 13608
Gerrit-PatchSet: 3
Gerrit-Owner: Harald Welte <laforge at>
Gerrit-Reviewer: Harald Welte <laforge at>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at>
Gerrit-Comment-Date: Thu, 11 Apr 2019 19:57:42 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list