Age | Commit message (Collapse) | Author | Files | Lines |
|
Commit dda21ed7d4a897c9284c69175d0da598598eae40 modified previous calls
to ippool_new() removing the pass of flags to avoid allocating certain
problematic IPs from the pool to MS, such as the network, gateway and
broadcast IPs.
Today I did some unsucessful tests with osmo-ggsn with a pool "ip prefix
dynamic 176.16.222.0/24", and thus IP 176.16.222.0 was being assigned to
the MS. De-capsulated DNS packets were received in the tun interface,
but the Linux system in there was unable to correctly forward the
packets to the gateway interface connected to the Internet. However,
adding a second MS which got 176.16.222.1 had its packets forwarded
correctly.
However, previous implementation relies on flag IPPOOL_NOGATEWAY flag to
blindly blacklist first IP after the network ip (ie, .0 and .1 are
removed), which limits the IP reserved for the tun device to be .1. If a
different IP in the range is assigned, it may cause issues. As a result,
a blacklist is introduced in this commit to dynamically fetch the tun IP
address and exlucde it from the pool of available IPs.
Change-Id: I8e91f7280d60490c858a769dd578c1c8e54e9243
|
|
Change-Id: I8e24f95a88bef3a59006a89c219871e6156963d7
|
|
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
|
|
If the default APN has not been started, it is not eligible to be
used in starting of new PDP contexts.
Change-Id: I93b5c205c033f275824ee8bc8cdcf1428fb086df
|
|
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
|
|
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
|
|
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
|
|
This is merely a cosmetic issue, no functional change.
Change-Id: I8663ee633524eedeed5ddd45ddb65a06825052ac
|
|
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
|
|
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
|
|
In case the GGSN is behind some kind of DNAT, the public GTP-C and
GTP-U IP addresses as exposed inside the GTP payload information
elements are different from the (internal, behind-nat) IP address
to which it listens/binds.
Change-Id: I548c9011c9abd66d46f963b1def61575f3dabb89
|
|
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
|
|
Change-Id: I0c8773bd6ef41332b91b5b025aef9ef129af8289
|
|
Change-Id: I9613ca3436e77ea132c47f0096df7c5050d7e826
|
|
The control interface handle never belonged into libgtp in the first
place. Commit 727417dd28813c697b4820aef9f54f249e30c4b8 should not
have added this to the shared library (used by sgsnemu, osmo-sgsn, ...),
but to some private state of the GGSN.
Introducing a private context pointer at the same location will keep
ABI compatibilty.
Change-Id: I4f17516dae3e04114564828a3e5f6e2ea54212a5
|
|
we rather pass the in46_prefix directly into ippool_new()
Change-Id: Iadf6274e881a9bfc75eb41f9380f5ae2d8c92a0f
|
|
Change-Id: I760f25df609c309eba4d5716f3e23b49320449bf
|
|
During IPv6 support implementation, helper function pco_contains_proto
was added which contains an error: It is only capable of finding first
protocol correctly, and as a consequence, in my setup DNS servers where not
sent back to the SGSN/MS, resulting in phone being able to connect to
IPs but not to domain names which required DNS resolution.
The condition in the while loop is also changed to match the increment
of the variable inside the loop to make it easier to understand at first
glance.
Fixes: 1ae98777d9b1ee62e6900caf4bb580d1a42bb416
Change-Id: Icc2e6716c33d78d3c3e000f529806228d8aa155e
|
|
For some reason Max' commits introducing the CTRL/trap interface
about one year ago didn't convert the IMSI to its actual textual
representation before usign it in the CTRL interface.
Let's clean that up by properly interpreting the IMSI.
Change-Id: I8b20d2e47a29de266d93a7ddd5e6877f7e346a63
|
|
As we can now have PDP contexts with IPv6 user IP payload,
it is useful to extend the TUN related code to be able to
configure the tun device IPv6 address + prefix length
Change-Id: I899d21e52d02e0b8384af29ddd489ff19c8f2cf6
|
|
In IPv6, DNS server information is not passed along as IPCP6 like
in IPv5 with IPCP. The reason is that IPCP6 (for PPP) doesn't
support passing DNS server information. Rather, the relevant RFCs
indicate DHCPv6 should be used even over point-to-point links.
3GPP decided to avoid DHCPv6 dependency for stateless autoconfiguration
(the only mandatory IPv6 configuration mechanism) and added some new
non-PPP-style PCO information elements ("containers") which can among
other things inform a MS about IPV6 DNS servers.
That same mechanism can also be used to inform the MS about IPv4 DNS
servers, so for IPv4 there are now two competing mechanisms: IPCP and
the new "native" PCO container. With this patch, we support both
for IPv4.
Change-Id: I21499afd61def8c925f7838bde76f34d28214b56
|
|
The 3GPP specs are quite strange when it comes to how an IPv6 address
or rather prefix is assigned to an IPv6 PDP context. The designated
method for allocating the IPv6 address via the PDP EUA (End User
Address) Information Element in the GTP signalling plane is *not*
used to allocate the address/prefix. Instead, the EUA is used to
allocate an "interface identifier" to the MS, which it the uses
to derive its link-local source address to send a router solicitation.
The GGSN subsequently answers witha router advertisement, advertising
a single/64 prefix, whihcthe MS then uses to generate it's real IPv6
source address for subsequent communication.
Change-Id: Icddf7d30e01d76a4784bcef5787b36f52f703a9f
|
|
In IPv6 GPRS, we actually don't want to allocate an individual v6
address (like in IPv4), but we want to allocate a prefix. The
standard prefix lengh is 8 bytes, i.e. a /64 prefix. This patch
extends the pool to be able to work with such v6 prefixes.
Change-Id: I0cf700b6baf195a2e5fbea000531f801acaaa443
|
|
When we receive PDP context requests for unknown PDP types or if
we run out of dynamic addresses, we need to inform the SGSN that
PDP context creation failed.
Change-Id: Ibf199c1726130d27c8f80230b30ee51101c93b06
|
|
This patch enables the use of IPv6 PDP contexts. The phone will
have to request an IPv6 End-user-Address, and the GGSN will have
to be configured for an IPv6 pool.
The outer transport-layer IP between SGSN and GGSN must still be
IPv4, it is not modified by this patch
Change-Id: I22c3bf32a98e5daf99d6eaeac8c9f95cc7574774
|
|
We can simply use 'struct iphdr' from netinet/ip.h to achieve
the same goal (and be portable).
Change-Id: Ieece22e127dc14a7ffdc3b05656628989ad00b32
|
|
Extend the IP pool implementation to be able to manage both pools
of 32bit addresses (IPv4) as well as pools of 128bit addresses (IPv6)
Change-Id: Ib98cc4bf634d6be9a7bf8c03a24e629455fcafc8
|
|
An EUA length of *2* octets indicates dynamic IP address, while
an EUA length of 0 is invalid. Let's fix this hack (which needs
to finally be removed anyway).
Change-Id: Ib1b57eb0654327882044d6862d955f4b32aa6bcd
|
|
Move common trap create/send code into separate function.
Change-Id: Iaadc921b951aeb9b3ad5ab796e13d52017139468
|
|
When Linux Kernel GTP-U support is enabled, OpenGGSN so far only worked
with GTPv0,but not with GTPv1, as the TEI values were not correctly
configured. This patch fixes the initialzation of the local and remote
TEI before using libgtpnl to create a tunnel context in the kernel.
Change-Id: I3e953ff5b4ab44c26dbbe20d18b61038fa57ff32
|
|
Do not attempt to send TRAP message on PDP context deletion if peer is
unknown.
Change-Id: I5e02c1d42bb7aaf1ef81a9824aab7b12047cdd3e
Fixes: Coverity CID 150135
|
|
Only generation of TRAP messages over Control Interface is supported so
far.
Note: requires corresponding version of libosmoctrl.
Change-Id: Ia76f841d2c9cd14394e9316fcd39f4060e23c898
Related: OS#1646
|
|
Change-Id: Iff0f1499660b12a47277b16a435efecb42fab038
|
|
gtp-kernel.h: In function ‘gtp_kernel_init’:
gtp-kernel.h:25:15: error: ‘struct gengetopt_args_info’ has no member named ‘gtpnl_given’
if (args_info->gtpnl_given) {
^
Makefile:422: recipe for target 'ggsn
Reported-by: Holger Freyther <holger@freyther.de>
|
|
--gtpnl is now gone, instead you have --gtpkernel that behaves as an on/off
toggle. We full rely on the kernel routing base to select the real device to
transmit.
I have updated ggsn/cmdline.ggo and then run 'gengetopt' to refresh the
automatic code generation for command line options that openggsn uses.
|
|
Andreas modified this interface, so update so this compiles again.
|
|
Signed-off-by: Andreas Schultz <aschultz@tpip.net>
|
|
This patch adds the -g, --gtpnl=device option that allows you to
enable the GTP kernel tunneling mode in openggsn. You have to specify
the real downlink device that will be used to tunnel traffic, eg.
-g=eth0
This means that the gtp0 device will be created and it will use eth0
as the real device to encapsulate packet coming from the Internet that
are addressed to the MS (so the tunnel devuce encapsulates these IP
packets in GTP packets when traveling to the SGSN).
Alternatively, you can also add this to the ggsn.conf configuration file:
gtpnl eth0
The device has to be the real device that can route packets to the SGSN,
if you select the wrong device, the kernel routing code may not find a
way to reach the SSGN, you've been warned.
Therefore, if this option is set, the operational becomes the following:
1) A gtp0 device is created via rtnetlink and configure the socket
encapsulation infrastructure in the kernel.
2) Whenever a PDP context is created, this adds the necessary tunnel
configuration via genetlink GTP interface.
3) Whenever a PDP context is destroyed, this deletes the tunnel via
genetlink GTP interface.
4) Destroy the gtp0 device if ggsn is stopped, including all of the
existing tunnels.
You require the osmo-ggsn.git tree, which contains the kernel module
gtp.ko and the libgtpnl library that you have to compile and install.
Make sure you have loaded the gtp.ko kernel module before launching
the ggsn daemon using the kernel driver mode, otherwise you will get
a nice "operation not supported" error message ;-).
This patch also adds supports for "ipup" configuration option to invoke
an external script after the gtp0 device has been brought up. Typical
command to add the route to reach the MS behind the GGSN is required,
eg. ip route add 10.0.0.0/8 dev gtp0.
The (horrible) ggsn parser has been manually extended to support the
new configuration option. That code doesn't look nice, but it just
mimics what we already have there for consistency, please don't blame
me for that.
If you want to run in debugging mode, I suggest you to use:
sudo ggsn -c ggsn.conf -f -d
Note that you do have to run openggsn as root to bring up the gtp0
device. You have to see this message that announce that the GTP kernel
mode is enabled.
openggsn[1106]: ggsn.c: 656: Using the GTP kernel mode (genl ID is 25)
This patch also automagically sets up route to reach MS from Internet
just like tun mode does. This is fundamental to get this working,
better don't leave to the admin, he may forget to add this route.
In this patch, I tried to encapsulate this new feature as much as
possible as Harald initially suggested.
To compile this feature, you have to pass --enable-gtp-kernel, ie.
./configire --enable-gtp-kernel
Otherwise, the code to interact with the gtp kernel part is not compiled.
Signed-off-by: Andreas Schultz <aschultz@tpip.net>
|
|
The specific log statements are not great yet but at least they
will end up in the log file. In the future everything should be
related to the IMSI or at least the tunnel id.
|
|
|
|
Fixes: SYS#599
|
|
|
|
The evolution would be to introduce libosmocore and start using
the logging framework. But even then we can map this option to
the file target.
Fixes: SYS#263
|
|
cmdline.c: In function ‘cmdline_parser_internal’:
cmdline.c:588:7: warning: variable ‘check_required’ set but not used [-Wunused-but-set-variable]
int check_required;
^
|
|
|
|
We are not using this option in any of our projects and it is breaking
make distclean. Remove the option for now.
make[2]: Entering directory `/openggsn-0.91/_build/ggsn'
Makefile:307: ../lib/.deps/getopt.Po: No such file or directory
Makefile:308: ../lib/.deps/getopt1.Po: No such file or directory
make[2]: *** No rule to make target `../lib/.deps/getopt1.Po'. Stop.
|
|
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.
|