mirror of
https://github.com/open5gs/open5gs.git
synced 2025-10-23 07:41:57 +00:00
64bb567aa287f9890b063203eb67824b23aea38a
This change revises the existing ogs_addaddrinfo() function to handle partial failures without aborting the process, ensure proper cleanup of any nodes allocated before an error, and emit more informative logs (including getaddrinfo() errors and situations where no usable addresses are returned). By introducing “tail” and “first_new” pointers, new entries can be appended to an existing list and safely detached if memory allocation fails mid‐stream. On top of that, a new helper API, ogs_sockaddr_from_ip_or_fqdn(), was added. It automatically detects whether its input is a numeric IPv4/IPv6 literal or a hostname (using AI_NUMERICHOST when appropriate), then delegates resolution to ogs_addaddrinfo(). Errors are logged at the error level but do not trigger a fatal exit, and any partial lists are cleaned up before returning. Finally, the SMF configuration parser in context.c was updated to use this new API for “p-cscf” entries, allowing both raw IP addresses and DNS names in smf.yaml. Corresponding adjustments were made in context.h (to change the p_cscf and p_cscf6 arrays to mutable char pointers) and in the cleanup routine smf_context_final() to free any dynamically allocated strings. Together, these improvements eliminate duplicate parsing logic, streamline configuration handling, and increase the overall resilience of address resolution across Open5GS.
Getting Started
Please follow the documentation at open5gs.org!
Sponsors
If you find Open5GS useful for work, please consider supporting this Open Source project by Becoming a sponsor. To manage the funding transactions transparently, you can donate through OpenCollective.
Special Sponsor
Community
- Problem with Open5GS can be filed as issues in this repository.
- Other topics related to this project are happening on the discussions.
- Voice and text chat are available in Open5GS's Discord workspace. Use this link to get started.
Contributing
If you're contributing through a pull request to Open5GS project on GitHub, please read the Contributor License Agreement in advance.
License
- Open5GS Open Source files are made available under the terms of the GNU Affero General Public License (GNU AGPL v3.0).
- Commercial licenses are also available from NewPlane at sales@newplane.io.
Support
Technical support and customized services for Open5GS are provided by NewPlane at support@newplane.io.
Languages
C
97.6%
Mustache
0.9%
JavaScript
0.5%
Meson
0.5%
Python
0.3%
Other
0.2%