Age | Commit message (Collapse) | Author | Files | Lines |
|
The gengetopt syntax can specify that a particular command line argument
depends on some other argument/option present. We can use this to
provide useful feedback to the user at the command line parsing state,
like --pingrate making no sense without --pinghost being specified.
Change-Id: Ief27275e90e6bce23aed1e83874dbac98dd0926b
|
|
If the EUA in the Create PDP Context Request was not supported by
the given APN (e.g. IPv6 request for a v4-only APN), we crashed.
Avoid this and add proper handling of this error case.
Change-Id: I8d1f7ec727c5d2d4427232015f81ed57d3440dff
|
|
This way, multiple sgsnemu instances can be runnig in parallel, each
of them creating a different tun device for their respective PDP context
Change-Id: Id12fbadf924a60db255b6d51b9f647aa51dd2e16
|
|
|
|
|
|
|
|
This doesn't yet cover all the functions in gtpie.[ch], but testing half
of them is better than not testing any of them, so let's merge this
current state with a couple of TDOO's on what we still need to test.
Change-Id: I30a6dd8a01b7a074ef2d3936d186dfff6c79e6c0
|
|
gtpie_decaps() always had this right, but the encapsulation functions
treated it as 8-byte fixed length IE.
I hope we had a chance to convert all of this to the normal libosmogsm
tlv_parser one day. This would have one description table for all TLV
types which then is used from encoder and decoder.
Change-Id: I48471f2735511806ac424b5ffc1929e85bb156f3
|
|
Change-Id: I6ab7bfb31f93f52f9f6b1b5880dcb2c232bba794
|
|
extended from https://github.com/osmocom/openggsn/pull/2
Change-Id: I31b3e4b378e74bb5a0a2f54af6d2a15b629876cf
|
|
Change-Id: Id69d957d0860ee49e7f0db5c64ab8ba976f8c8d6
|
|
Change-Id: Ia048abcd80f29581c6ac02cd7f534f2617005671
|
|
libgtp should have proper API documentation, let's start with the
gtpie.[ch] parts.
Change-Id: I97df5bd3c8dcc5c97a114c8c6abadabf33147b05
|
|
Change-Id: Ide487e34884c8356694246f43c3f1f562357304c
|
|
Change-Id: Id032c330405e5dca8ecfc0970d128341ed75c675
|
|
Change-Id: Ia2f9ac60f08823d5f7c1a76c0b7cbd65ac615e26
|
|
Change-Id: Ie21e8bfab7cda52aa696dd26280efc05c4b51bba
|
|
Change-Id: I030bd616dd27d49e55b5bdcc7c0b4fa3eb523da4
|
|
Change-Id: I8e24f95a88bef3a59006a89c219871e6156963d7
|
|
This test creates a variety of v4 (and one v6) pool and performs
allocations until the pool is full, then frees a random number of
randomly distributed addresses, re-allocates them and again checks that
they're all available and finally once the pool is full allocations
fail.
Change-Id: Ibf4588e8f3ae71684e5262c0caaa2689aee73a94
|
|
From getifaddrs(3) man:
"The data returned by getifaddrs() is dynamically allocated and should
be freed using freeifaddrs() when no longer needed"
Change-Id: If6300d1c8d36fcafef294a4c11bbda31a158bb9c
|
|
Program terminated with signal SIGSEGV, Segmentation fault.
0 create_context_ind (pdp=0xb6b391b0 <pdpa>)
at /usr/src/debug/osmo-ggsn/1.0.0+gitrAUTOINC+ab5e160937-r0/git/ggsn/ggsn.c:453
453 if (!apn->started)
(gdb) bt
0 create_context_ind (pdp=0xb6b391b0 <pdpa>)
at /usr/src/debug/osmo-ggsn/1.0.0+gitrAUTOINC+ab5e160937-r0/git/ggsn/ggsn.c:453
1 0xb6b225e0 in gtp_create_pdp_ind (gsn=gsn@entry=0x74f28, version=version@entry=1, peer=0x0,
peer@entry=0xbee6ead4, fd=-1092167056, fd@entry=8, pack=pack@entry=0xbee6eae4, len=len@entry=179)
at /usr/src/debug/osmo-ggsn/1.0.0+gitrAUTOINC+ab5e160937-r0/git/gtp/gtp.c:1591
2 0xb6b245e4 in gtp_decaps1c (gsn=0x74f28)
at /usr/src/debug/osmo-ggsn/1.0.0+gitrAUTOINC+ab5e160937-r0/git/gtp/gtp.c:2986
3 0x41d770c0 in osmo_select_main () from /usr/lib/libosmocore.so.8
4 0x000121b8 in main (argc=4, argv=0xbee70e54)
at /usr/src/debug/osmo-ggsn/1.0.0+gitrAUTOINC+ab5e160937-r0/git/ggsn/ggsn.c:897
Fixes: dd266066c7cc96c797034da352cc9d72177c5780, b16c46b4c36383368eb1581e40d0a8ca751ddc53
Change-Id: Ie4ec74e87aaf1d067dd1717d986673be56c4d6ed
|
|
The idea is to only implement the GTP-C plane and configure the right
link-local source address on the tun-device and let the regular (Linux)
kernel take care of sending router solicitations and
accepting/processing the related router advertisement. This avoids a
lot of complexity in sgsnemu.
For this to work, you must have /proc/sys/net/ipv6/conf/$tun/accept_ra
set to either 1 (works only if no IPv6 forwarding/routing configured on
your sgsnemu-running system) or 2 (works even if forwarding/routing is
configured).
Change-Id: I57e4c53ee648e1efecfba3eea592d1129849557c
Closes: OS#2518
|
|
|
|
If the default APN has not been started, it is not eligible to be
used in starting of new PDP contexts.
Change-Id: I93b5c205c033f275824ee8bc8cdcf1428fb086df
|
|
This just adds the capability to sgsnemu to request a certain PDP
EUA type. It doesn't mean it actually handles anything beyond the
existing IPv4 yet.
Change-Id: I157f9157a7ff2ea56c37a4a902d4706de4c7d35d
|
|
Change-Id: I33f65e404217e717bd795e5229c8d9456a7b3739
|
|
Tell the user about possible causes of failure to set the IPv6
address of the tun device, such as general lack of IPv6 support in
the kernel/OS, or the use of /proc/sys/net/ipv6/conf/default/disable_ipv6
Change-Id: I5ff812425ee12b8386bb66521e05c93e825a4506
|
|
Change-Id: If981cc0696122cb69c01ceac6f54ae01bcbf4a2d
|
|
If we receive a GTP-C CREATE PDP CONTEXT for an APN that we were
unable (or not configured) to start, ignore that APN.
Change-Id: I8011a9ccc1d5effd3779f184c9055af46838ccaf
|
|
When there's an interim error (e.g. in resolving the link-local address
or setting up the tun device), apn_start() simply calls apn_stop()
on the not-yet-fully-started apn_ctx.
This only works if apn_stop() doesn't bail out early in case of
a not-started apn_ctx, so let's remove the related check at the
start of the function.
Change-Id: I2917a6258cb73cc12fd9d81296ff0eaa616890b9
|
|
files in doc/examples/ dir end with .cfg, as well as all configuration
files present in all projects.
Change-Id: I361c67809d095dd08b0f400de2a6f84f981411c5
|
|
It might be useful for any user of libgtp who uses libosmocore so let's
make generalized version of it available as part of installable header.
Change-Id: I79aba10ef989384a28f059c30899e65c771ae5e1
Related: SYS#3610
|
|
G-PDU sequence numbers"
|
|
|
|
sequence numbers
Related: OS#2519
Change-Id: Idc650d896f0f72329090b56a37d9c16359294860
|
|
GTP sequence numbers on GTP-U are optional for G-PDU type messages (i.e.
user-ip messages). Let's allow the user to specify this behavior by
a new pdu_t.tx_gpdu_seq flag. The flag is enabled by default to stay
compatible with the prior behaviour.
Related: OS#2519
Change-Id: Icf22a2ddd5c4a968ef5bda7c202b921d93fb49e6
|
|
This per-APN vty option determines if we are transmitting GTP sequence
numbers in downlink G-PDU messages. This behavior is optional as per
GTP spec. The default behavior is "true", like before this change.
Related: OS#2519
Change-Id: Ibf0de261f83951309b01b4feae998b6656c77664
|
|
|
|
There was a copy+paste mistake that created syntax errors during the
write of a config file that contained IPv6 DNS server settings.
Change-Id: Ida40c32c72dba8155f8294b93484e46e8bd27739
|
|
This is merely a cosmetic issue, no functional change.
Change-Id: I8663ee633524eedeed5ddd45ddb65a06825052ac
|
|
I'm not quite sure how I ended up doing this, but for some strange
reason the code before this commit is sending the ICMPv6 Router
Advertisements from some weird non-standard source address. This is
a violation of RFC4861 which clearly states that the source address
of router advertisements "MUST be the link-local address assigned to the
interface from which this message is sent."
Change-Id: Ib444af70fc8f0b433d371281601fd5a37b29039e
|
|
Let's introduce a couple of #defines that make the code much more
readable.
Change-Id: I3635d679fd54507274b46e99a02bdbbe41d7684e
|
|
Adresses two "TODO Should be avoided" comments about an extra memcpy()
before sendto() that can be replaced by a single sendmsg() call with an
iovec array: 1 record for the GTP header + 1 record for the user payload.
Change-Id: Ie332a6b15972330fcf540753898eb84ecb84fe24
|
|
gengetopt by default picks the program name from PACKAGE (autotools),
which is osmo-ggsn and is obviously wrong in case of sgsnemu.
After this patch, "sgsnemu --help" no longer shows "osmo-ggsn" but
"sgsnemu" at the top of the help text.
Change-Id: Ifabc2435a503ef71aa5a002ca46833f329068b37
|
|
This will replace the manual additions to cmdline.[ch] with
auto-generated code from gengetopt. We need to fix-up the RAT Type in
sgsnemu.c as the manually-added code diverged from what gengetopt
generates.
Change-Id: Ia687e13d5cec1655a57078a767d2123aa022842c
|
|
In commit 3a4c67b4bf0067c4949a60bc750d01e0576c5e08 we introduced the
--norecovery command line option, but this was apparently done by
manually editing the C source code rather than adding it to the .ggo
and letting gengetopt do its magic. Let's fix this up.
Change-Id: I1698280a699b17cea65651c3736ef149aba7e432
|
|
In commit 41af5691ef08fb70e2c65aba03c8b9e6c20983a6 we introduced the
--rai command line options, but this was apparently done by
manually editing the C source code rather than adding it to the .ggo
and letting gengetopt do its magic. Let's fix this up.
Change-Id: Iaab404c3bcfc0c3943764f6616763f4f407d5644
|
|
In commit 944dce3e66f3bc5b74f24dfbbee2370a231a39a9 we introduced various
command line options, but this was apparently done by manually editing
the C source code rather than adding it to the .ggo and letting
gengetopt do its magic. Let's fix this up.
Change-Id: Ib8e7ef1cad5fc4423a1a4af628950aa93a4e073a
|
|
In commit 11a398fbc3ad9b655d8ba947bea7012f7ce81604 we introduced the
--qose{1,2,3,4} command line options, but this was apparently done by
manually editing the C source code rather than adding it to the .ggo
and letting gengetopt do its magic. Let's fix this up.
Change-Id: I4cd827a96ac17f6eb9f824342f195727426d0e20
|