aboutsummaryrefslogtreecommitdiffstats
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2018-04-17use osmo_init_logging2Pau Espin Pedrol3-3/+12
Change-Id: Ic38fff17cc985238b91999c8acdd92d22fd28c72
2017-12-11Add support for IPv4v6 End User AddressesPau Espin Pedrol2-10/+85
Before this commit, when an MS requested an ipv4v6 context osmo-ggsn returned an error stating the type was unknown, and this text was printed in the log: Processing create PDP context request for APN 'ims' Cannot decode EUA from MS/SGSN: f1 8d This patch has been tested with an MS running the 3 types of addresses: - IPv4 and IPv6: no regressions observed, the context is activated and packets are sent to the ggsn. - IPv4v6: Wireshark correctly parses request and reponse, and then ICMPv6 traffic from both sides. Finally I see the MS using the IPv4 and IPv6 DNS addresses advertised and TCP traffic over IPv4 (because probably my IPv6 network setup is not correct). I also checked I can disable/enable data (pdp ctx delete and activate) several times without any issue. Change-Id: Ic820759167fd3bdf329cb11d4b942e903fe50af5
2017-12-04tests: Split ipv6 specific tests into a new test groupPau Espin Pedrol10-352/+440
This way they can be easily disabled later on when IPv6 support is made optional. Change-Id: I3906dbf55ccf1650083398e08ac870add0bbdcef
2017-11-29sanitize build: ensure uint16/32 alignment in gtpie_test and in46a_testNeels Hofmeyr2-6/+8
Fixes sanitize build failures: Testing gtpie_tlv() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:30:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint16_t', which requires 2 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 17 00 06 01 02 03 04 05 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Testing gtpie_tv0() Testing gtpie_tv1() Testing gtpie_tv2() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:76:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint16_t', which requires 2 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 2a ab cd 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Testing gtpie_tv4() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:90:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint32_t', which requires 4 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 2a ab cd 01 23 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Testing gtpie_tv8() ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:104:2: runtime error: load of misaligned address 0x55c0a0830f21 for type 'uint32_t', which requires 4 byte alignment 0x55c0a0830f21: note: pointer points here 00 00 00 2a 00 01 02 03 04 05 06 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:105:2: runtime error: load of misaligned address 0x55c0a0830f25 for type 'uint32_t', which requires 4 byte alignment 0x55c0a0830f25: note: pointer points here 00 01 02 03 04 05 06 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ Change-Id: I9eb16450af942d6464211e190f6a4d5a1d814842
2017-10-31fix compiler warnings: return 0 in main(), in 3 testsNeels Hofmeyr3-0/+3
Change-Id: I9e49ceba6b0a8dffd331e5707667d9bb007f3ec7
2017-10-17ippool: Implement and use blacklist instead of blindly using IPPOOL_NOGATEWAYPau Espin Pedrol3-16/+287
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
2017-10-16lib/in46a: Introduce in46a_netmasklen APIPau Espin Pedrol2-0/+61
Change-Id: I06e3e038afd8f7afaec2a3fa67b1616500c8db80
2017-10-16lib/ippool: Fix listsize calculated 1 elem too smallPau Espin Pedrol2-15/+20
Take the chance this commit is changing test output to also remove use of IPPOOL_NOGATEWAY which is going to be removed soon, and instead test IPPOOL_NOBROADCAST. Change-Id: I95c24bc690490155bec9e3933d678e4668d7745f
2017-10-14Add unit tests for libgtp gtpie.[ch] functionsHarald Welte5-0/+159
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
2017-10-13Add unit tests for lib/in46_addr.c codeHarald Welte4-2/+300
Change-Id: Id032c330405e5dca8ecfc0970d128341ed75c675
2017-10-13tests: Remove Makefile.inPau Espin Pedrol1-0/+0
Change-Id: Ie21e8bfab7cda52aa696dd26280efc05c4b51bba
2017-10-13Add ippool unit-test for 'make check' runsHarald Welte6-0/+66746
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
2010-05-04remove autotools-generated filesHarald Welte1-0/+0
All those will be re-generated by "autoreconf -i" anyway, so there's no point in keeping them in the repository. Also, the 'bootstrap' script is no longer working with recent autotools versions anyway.
2002-12-16Initial revisionjjako2-0/+0