Commit Graph

10 Commits

Author SHA1 Message Date
Pau Espin 623c5b36e9 libgtp: Remove packets in tx queue belonging pdp being freed
Doing so should avoid the crash seen in OS#3956, where a message is
received in osmo-sgsn gtp iface after having received a DeleteCtxAccept
message where pdp and associated cbp is freed. As a result, when new
confirmation arrives, it can still be matched against an old request and
be sent to upper layers providing an already freed cbp.

With this patch, since all queued messages belonging to that pdp are
dropped, confirmation won't find a match and be discarded in libgtp.

In order to be able to drop all req messages belonging to a pdp, a new list
is added to pdp_t and qmsg_t are added to that list when inserted into the per-gsn
req transmit queue. This way upon pdp free time it's simply a
matter of iterating over that list to remove all messages.

There's no need to do same for resp queue, and it'd be actually
counter-productive, because it wouldn't be possible to detect and
discard duplicates anymore after pdp ctx has been freed.

Related: OS#3956
Change-Id: Id86d0b241454d3ad49c64c28087fd2710fa2d17a
2019-08-23 14:38:56 +02:00
Pau Espin 8b90bce962 gtp: Add missing headers
Those headers are using types defined in other places (like sockaddr_in)
and don't explicitly include them, which makes future queue_test fail.

Change-Id: I65e12a067d89ef71be3719636b64f4d93ea73cc4
2019-06-20 17:08:13 +02:00
Pau Espin f0829ff34b cosmetic: gtp: queue: remove trailing whitespace
Change-Id: I20c83cd607ae8e1025fdc1a810c0d27bad80b178
2019-06-20 17:08:06 +02:00
Harald Welte 632e843e5f Rename OpenGGSN to OsmoGGSN
Osmocom has maintained this program since about 7 years now, while
the original author / copyright holder has completely disappeared.

With the introduction of Osmocom-style CTRL and VTY interfaces,
the way how the program is used and configured has substantially
changed.  In order to avoid confusion in terms of configuration file
format etc, let's rename it to OsmoGGSN.

Change-Id: I2da30f7d4828e185bfac1a4e2d8414b01cbe4f9d
2017-09-06 09:17:15 +02:00
Harald Welte bed35df298 Convert all code to Linux coding style
After so many years of silence, we don't expect the original author to
return to the project.  To make things a bit simpler for us, we convert
the coding style to what we are used to (Linux style).

The conversion was made using the 'Lindent' script which is part of the
Linux kernel.
2011-11-02 13:06:18 +01:00
jjako 0fe0df0079 qos length bugfix and apple support plus header cleanup 2004-09-17 11:30:40 +00:00
jjako b7b93fc78f Rename u_int to uint 2004-01-09 11:56:48 +00:00
jjako 193e8b1b01 Added --net, --nsapi, --gtpversion options 2003-11-10 12:31:41 +00:00
jjako 08d331db63 First attempt at a GTP1 implementation 2003-10-13 20:33:30 +00:00
jjako 52c2414f6c Initial revision 2002-12-16 13:33:51 +00:00