aboutsummaryrefslogtreecommitdiffstats
path: root/lib/in46_addr.c
AgeCommit message (Collapse)AuthorFilesLines
2017-12-11Add support for IPv4v6 End User AddressesPau Espin Pedrol1-26/+83
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-10-16lib/in46a: Introduce in46a_netmasklen APIPau Espin Pedrol1-0/+58
Change-Id: I06e3e038afd8f7afaec2a3fa67b1616500c8db80
2017-10-13in46a_to_sas(): Return AF_INET6 in case of IPv6 addressHarald Welte1-1/+1
Change-Id: Ia2f9ac60f08823d5f7c1a76c0b7cbd65ac615e26
2017-10-13Remove trailing whitespacePau Espin Pedrol1-1/+1
Change-Id: I8e24f95a88bef3a59006a89c219871e6156963d7
2017-10-01Replace EUA magic numbers for IETF, IPv4 and IPv6 with #definesHarald Welte1-6/+7
Change-Id: I33f65e404217e717bd795e5229c8d9456a7b3739
2017-09-05lib/in46_addr: Avoid ASSERT() when in46a_ntop() is called on uninitialized ↵Harald Welte1-1/+8
address Change-Id: I42d41ec1370b9cc15d372b649d8e1bc78e76af9b
2017-09-05lib/in46_addr: Add 'struct in46_prefix' to represent addr + prefixHarald Welte1-0/+7
Change-Id: I797d105117e81951732bcfc2cc26a8d00fd69443
2017-09-05lib/in46_addr: Add in46a_ntoa() function, similar to inet_ntoa()Harald Welte1-0/+10
Change-Id: I752b7033a106a74dc219047da5c3a7ad3cd3602e
2017-08-11IPv6: in46_addr: OSMO_ASSERT() in case of unsupported callsHarald Welte1-0/+6
There's a bit of trickery with the ip_pool and it's "lengty=8" IPv6 prefix handling, let's make sure we don't accidentially call any support functions with addresses of wrong length. Change-Id: I444c190bdcd18780344e1f0dad4faf3bcf9da5a5
2017-08-09ippool: Extend pool to work with /64 prefixesHarald Welte1-0/+2
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
2017-08-09in46_addr: Add new function in46a_prefix_equal()Harald Welte1-0/+17
This function is used to compare an IPv6 address against another, using the smaller of the two prefix lengths. Change-Id: Ic993d8abdc90897cb55276f01ae3b8a5eadf5a0d
2017-08-09IPv6 support for user IPHarald Welte1-0/+60
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
2017-08-09ippool: Add IPv6 support to IP pool implementationHarald Welte1-0/+148
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