Age | Commit message (Collapse) | Author | Files | Lines |
|
Change-Id: I84bbe9eff37e14985b812b49e53eb6d62fff14a5
|
|
Change-Id: I265637f39dd16dd43992f33149e512e34ed83252
|
|
Change-Id: Ide9465a01857dbe5ec7f5bc1d09468153865156f
|
|
"An address '192.168.7.1' is specified without prefix length. The behavior
of parsing addresses without prefix length will be changed in the future
release. Please specify prefix length explicitly."
Change-Id: I51777c6344191182fb87bae6f0048ce422802541
|
|
Change-Id: Ib6a97d8c93203e1f896ab1bd3d200d2223f9fc48
|
|
Modern gcc-9.2.1 actually fails like this with --enable-werror active:
In file included from sgsnemu.c:52:
In function ‘process_options’,
inlined from ‘main’ at sgsnemu.c:1557:6:
../lib/syserr.h:31:3: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
31 | logp2(sub, pri, __FILE__, __LINE__, 0, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 | fmt "\n", ##args); \
| ~~~~~~~~~~~~~~~~~
sgsnemu.c:435:3: note: in expansion of macro ‘SYS_ERR’
435 | SYS_ERR(DSGSN, LOGL_ERROR, 0,
| ^~~~~~~
sgsnemu.c: In function ‘main’:
sgsnemu.c:436:42: note: format string is defined here
436 | "Listening address must be specified: %s!",
| ^~
It is correct: We are dereferencing args_info.listen_addr in a
branch which explicitly checks if that is NULL beforehand :/
Change-Id: I417f447f821d396aa92049e0a791121240f1cf44
|
|
Related: OS#4178
Change-Id: I295b89ee493d230c2550d461fca9602c589d38b5
|
|
Currently each user (application) of libgtp needs to manage its own
timers in order to call gtp_retrans_timeout() and gtp_retrans() and
maintain retransmit and duplicate queues working correctly. This adds
unnecesary complexity to applications since nowadays, as a libosmocore
user, libgtp can handle this internally in an easy way.
Furthermore, keeping the timers internal to the library allows for
easier extension of features as well as re-implementation of related
code in the future.
Last but not least, it was detected that existing known applications
(osmo-sgsn, osmo-ggsn, sgsnemu) are not using correctly the API, since
they should be updating their timers through gtp_retrans_timeout()
everytime a message is enqueued/transmitted, otherwise they may fire
gtp_retrans() for retransmition too late in some cases.
Related: OS#4178
Change-Id: Ife7cfd66d6356f413263fe5bda9e43091f5c9e98
|
|
Change-Id: I39e92f25ed51665c8a615826ed52f35024bdd54b
|
|
This change fixes the following compiler warnings (found by Clang):
gtp.c:2747:13: warning: variable 'pdp' is used uninitialized
whenever 'if' condition is false
[-Wsometimes-uninitialized]
} else if (version == 1) {
gtp.c:2781:14: note: uninitialized use occurs here
OSMO_ASSERT(pdp);
^^^
Shall not happen in general, but let's make Clang happy.
Change-Id: Id471b22afd4c45435589a4edda0a804e66be3a7a
|
|
As stated in the comment above, we need to use the tunnel identifier
to find a GTP context, and derive both IMSI and NSAPI from that TID,
when speaking GTP version 0.
This change fixes the following warnings (found with Clang):
gtp.c:2115:22: warning: variable 'pdp' is uninitialized
when used here [-Wuninitialized]
pdp_set_imsi_nsapi(pdp, tid);
^^^
gtp.c:2118:34: warning: variable 'imsi' is uninitialized
when used here [-Wuninitialized]
if (gtp_pdp_getimsi(gsn, &pdp, imsi, nsapi))
^^^^
gtp.c:2118:40: warning: variable 'nsapi' is uninitialized
when used here [-Wuninitialized]
if (gtp_pdp_getimsi(gsn, &pdp, imsi, nsapi))
^^^^^
Change-Id: I8f1c8d0ba2e8189d97fe1bb5c872680e5ad1cd7a
|
|
Update documentation since nowadays there are more paths calling
ggsn_close_one_pdp() (because we now close pdp contexts during sgsn
timeouts).
Switch pdp_freepdp() to gtp_freepdp() since in the event we ended up
there in the future we want to go through normal delete_ctx_cb to free
related application data structures.
Change-Id: I7d9ae9a27390498ba387797aac6651e32fa44f29
|
|
Change-Id: I1f85c7cc7684e146fca4f17914927d45410dbb84
|
|
That code was commented out in 0b076a331e1e7f955580313a5da416c170b3b4ce
(year 2003), and indeed it makes no sense to call those in current pdp
lifecycle (they are expected to be freed by the application).
Change-Id: I096d8cb8d749ff9b737d6f3f96b1d423660ece37
|
|
Change-Id: Ie768ddb45313582b4b5358b97a981080be64fd42
|
|
Fixes: eefa30dce8fa8e0ae16a3108e23041f92ea6ab21
Fixes: 2d6a69e69a4b4cb2b8cc63c4810dae44e5a4d8f6
Change-Id: I9ee5f4142cacf912145693c72a53c0f531bad2c6
|
|
This patch is quite big because implementing echo req/resp and recovery
requires having knowledge and managing differentiated state for each GSN
peer attached/connected to osmo-ggsn. This kind of information was not
available in osmo-ggsn nor in libgtp.
So osmo-ggsn is now able to track GSN peers connected to a
ggsn_ctx (associated gsn_t from libgtp) by means of "sgsn_peer" data
structure, and accessible from the ggsn through a list. The instances of
sgsn_peer are currently allocated and destroyed dynamically based on
discovered peer who have at least a pdp context attached to us (we are
not interested in peers without pdp contexts because we don't need to
send echo requests/responses and maintain state in that case).
A new private pointer (pdp_t->priv) data structure struct pdp_priv_t is
added to be able to relate a pdp_t to an sgsn as well as the already
existing pointer to an apn.
An "echo-interval <0-36000>" VTY command is added which allows
configuring time wait between echo requests being sent to each
sgsn_peer. Transmission of echo requests is disabled by default.
Finally, a new "show sgsn" VTY command is introduced, and its output is
also printed during "show ggsn".
Related: OS#4165
Change-Id: Id2c84165dc59dff495106758146a701ca488834f
|
|
Since osmo-ggsn can manage several GSN structures simultaneously, it
needs the gsn_t pointer to know the ggsn it should forward the call to.
Related: OS#4165
Change-Id: I33b4fe594d5833993af01cce34737e61e597b320
|
|
Change-Id: I49e7db4d0f5c7868b86a4947d8b5739c2068da46
|
|
GTP version and primary/secondary information is printed now for each
pdp context.
Related: OS#4154
Change-Id: If9682fe343e9a1e78175a12538fb80d4bda54802
|
|
Change-Id: Ie772f2c54264c8bc91f50d9030479861dd8868b7
|
|
Fixes potential duplicates when calling following VTY cmd:
show pdp-context ggsn NAME
show pdp-context ggsn NAME apn APN
Related: OS#4154
Change-Id: I98db39a710a72a1438d71aabaf4f8227984643e3
|
|
Change-Id: I237acdee0be19498804e0d509c610f4e0454ba72
|
|
in46a_from_eua() API documentation clearly states an array of 2 items
should be passed as pointer, but show_one_pdp() was passing only one,
which would end up in out-of-bounds writes on v4v6 EUAs.
Let's better use ippool to print allocated ip addresses instead of
parsing EUAs we sent some point in the past.
Change-Id: I7e164f40f50de43027bcd4464aa879450d2fb10e
|
|
Preparation for next commit, where this function will be needed inside
libmisc (lib/*).
Change-Id: Ibab4f6c09d1e5f0e9cfaea28ae1e7ab5b5c219b5
|
|
This way we further shrink ggsn.c and leave there GGSN related code.
Change-Id: I9e6a3beac7657f0a8c02d514b54c6f1caa93bba7
|
|
in46a_from_eua() API documentation clearly states an array of 2 items
should be passed as pointer, but show_one_pdp() was passing only one,
which would end up in out-of-bounds writes on v4v6 EUAs.
Let's better use ippool to print allocated ip addresses instead of
parsing EUAs we sent some point in the past.
Related OS#4154
Change-Id: Ia34939957bb7856388cb52a741cec0c015a08c70
|
|
Change-Id: I27238c330f9b805ac9e734e735d2c7ae158fe524
|
|
This way ggsn.c is shrinked in size and get rid of a lot of code there,
which is of no interest unless the reader is interested in that really
specific part.
Change-Id: Ieaa7e71f17c7fd9377c76ef53362eab596d669a6
|
|
It's clearer having size-related checks in one place for a data structure
in46_addr, instead of spread around the code.
Change-Id: Idc94bf0c8c01bb5a30e36d3c284b99f66b972abb
|
|
The libgtp application may have already allocated related resources
associated to the pdp context, so we need to signal its deletion in
order to let the application free the resources.
This should fix the duplication of pdp contexts seen in osmo-ggsn when
"show pdp-context" related VTY commands are used.
It was spotted due to some MS requesting a v4v6 context on a
v4-only APN, where first v4 address was allocated, and then upon v6
allocation create_context_ind() called
gtp_create_context_resp(GTPCAUSE_MISSING_APN) but the first address was
not freed. Upon receiving the callback, osmo-ggsn should now free the
related resources.
Related: OS#4154
Change-Id: I6c6215a4ce478afabc78ffaf5ffb0cf829e41226
|
|
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
|
|
$target/$target_os is never used, so AC_CANONICAL_TARGET is useless.
$host is, so employ AC_CANONICAL_HOST.
Change-Id: I6dc505888b42cfb686043470d3a3548c24cbe1f7
|
|
Change-Id: I5ca7ada037a9b91c3b747cea6d83654d0b9afed3
|
|
Older commit made use of gsm48_decode_bcd_number2(), which is available
in libosmocore 1.1.0 onwards, but forgot to increase configure.ac
requirements.
Fixes: fb625041601c525c23c96482250157dddb0941a4
Change-Id: I89b37be55fc4ba22b90e9aab9a5989573df2ae38
|
|
Since March 15th 2017, libosmocore API logging_vty_add_cmds() had its
parameter removed (c65c5b4ea075ef6cef11fff9442ae0b15c1d6af7). However,
definition in C file doesn't contain "(void)", which means number of
parameters is undefined and thus compiler doesn't complain. Let's remove
parameters from all callers before enforcing "(void)" on it.
API osmo_stats_vty_add_cmds never had a param list but has seem problem
(no "void"), so some users decided to pass a parameter to it.
Change-Id: I0a89586ce683ad060212355b37470c349992ec49
Related: OS#4138
|
|
Catched by gcc 9.1.0:
osmo-ggsn/sgsnemu/sgsnemu.c:1294:2: error: converting a packed struct ip_ping pointer (alignment 1) to a uint16_t {aka short unsigned int} pointer (alignment 2) may result in an unaligned pointer value [-Werror=address-of-packed-member]
1294 | p = (uint16_t *) & pack;
Change-Id: I783f104c31234a07f2a13f6dbc577a71b25b36a7
|
|
Change-Id: I6bb8c3df53a585913d5e0351ecad2e6ae9f0b886
Closes: CID#178643
|
|
Related: OS#3047
Change-Id: I0ad159a3973d28ac79ea7fb433401c72b247c2b0
|
|
Related: OS#3230
Change-Id: Iba869a75745cea01024fa3ce04917c02fa608a13
|
|
This macro is preferred by autofoo upstream. It was added around
automake 1.7, and offers backward compatibility with AM_CONFIG_HEADER.
Related: OS#3230
Change-Id: I88707d4895d9c231715d5252d2cfab589b42fe0c
|
|
Change applied as a result of running "autoupdate".
Change-Id: I955b535737f0a0cbdf25377609cec8f3d8d3eb45
|
|
$ autoconf -Wall
configure.ac:11: warning: The macro `AC_CANONICAL_SYSTEM' is obsolete.
configure.ac:11: You should run autoupdate.
autoupdate applied the change present in this commit.
Change-Id: Iee59e6e9a7670867d5bc55ba96f79130bc6982f6
|
|
We have a structure to handle that data type, so let's use it.
Change-Id: I991e53544b733df7773d66280ffa19a2a5123d97
|
|
Change-Id: I3d80833319869503691a52927892e6ac30744915
|
|
Change-Id: I38c2c4178ff4fd795f54638adec63166b1c0838e
|
|
Some modems are configured to use PAP as an additional authentication
mechanism beyond the GSM authentication that's part of GMM. Let's
handle such PAP authentication requests by simply acknowledging them
all, without actually checking any credentials database.
This is the most sane thing we can do for now, without adding external
requirements / interfaces like radius servers or the like.
Closes: OS#3914
Change-Id: I81875f30f9f1497199253497f84718510747f731
|
|
Closes: OS#1740
Change-Id: Id09bc5e23aa7a4b864822bc92cc23a4b60db52c3
|
|
Change-Id: I8523a0d0508d7fb870a4a9119aa8eb4c3a4d6f17
|
|
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
|