Projects
osmocom:master
libosmocore
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 209
View file
libosmocore.spec
Changed
@@ -14,13 +14,13 @@ Name: libosmocore Requires: osmocom-master -Version: 1.8.0.226.aea7 +Version: 1.8.0.227.e8322 Release: 0 Summary: The Open Source Mobile Communications Core Library License: GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND AGPL-3.0-or-later Group: Productivity/Telephony/Utilities Url: https://osmocom.org/projects/libosmocore/wiki/Libosmocore -Source: libosmocore_1.8.0.226.aea7.tar.xz +Source: libosmocore_1.8.0.227.e8322.tar.xz Source1: rpmlintrc BuildRequires: automake >= 1.6 BuildRequires: libtool >= 2
View file
commit_aea78a248324e2e52218132ba25377ac437d7cc9.txt
Deleted
View file
commit_e83227f735e214d269e6d009436601e812cba59a.txt
Added
View file
libosmocore_1.8.0.226.aea7.dsc -> libosmocore_1.8.0.227.e8322.dsc
Changed
@@ -2,7 +2,7 @@ Source: libosmocore Binary: libosmocore, libosmocodec0, libosmocodec-doc, libosmocoding0, libosmocoding-doc, libosmocore20, libosmocore-doc, libosmogb14, libosmogb-doc, libosmogsm18, libosmogsm-doc, libosmoisdn0, libosmoisdn-doc, libosmovty9, libosmovty-doc, libosmoctrl0, libosmoctrl-doc, libosmosim2, libosmosim-doc, libosmousb0, libosmousb-doc, libosmocore-dev, libosmocore-utils, libosmocore-dbg Architecture: any all -Version: 1.8.0.226.aea7 +Version: 1.8.0.227.e8322 Maintainer: Osmocom team <openbsc@lists.osmocom.org> Homepage: https://projects.osmocom.org/projects/libosmocore Standards-Version: 3.9.8 @@ -35,8 +35,8 @@ libosmovty-doc deb doc optional arch=all libosmovty9 deb libs optional arch=any Checksums-Sha1: - 3af66c591d2a704ae08556e5f36a3e0691a0f606 1064744 libosmocore_1.8.0.226.aea7.tar.xz + d70a5d7339d8dfa7a16cbfe688d2202c9091a326 1064652 libosmocore_1.8.0.227.e8322.tar.xz Checksums-Sha256: - 901ee9743ad8ae6407b976624e3684944e0fbfcf8b1b91918739b4b754aba9d5 1064744 libosmocore_1.8.0.226.aea7.tar.xz + 31a36889e6792018868704977233975af083174df2659b68ab02b0116f7d4046 1064652 libosmocore_1.8.0.227.e8322.tar.xz Files: - f6ec460eccdba3894ddf3116cb8a56d0 1064744 libosmocore_1.8.0.226.aea7.tar.xz + c985b9c36cd2016d2124867a8e33a17c 1064652 libosmocore_1.8.0.227.e8322.tar.xz
View file
libosmocore_1.8.0.226.aea7.tar.xz/.tarball-version -> libosmocore_1.8.0.227.e8322.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -1.8.0.226-aea7 +1.8.0.227-e8322
View file
libosmocore_1.8.0.226.aea7.tar.xz/debian/changelog -> libosmocore_1.8.0.227.e8322.tar.xz/debian/changelog
Changed
@@ -1,8 +1,8 @@ -libosmocore (1.8.0.226.aea7) unstable; urgency=medium +libosmocore (1.8.0.227.e8322) unstable; urgency=medium * Automatically generated changelog entry for building the Osmocom master feed - -- Osmocom OBS scripts <info@osmocom.org> Sun, 20 Aug 2023 14:37:28 +0000 + -- Osmocom OBS scripts <info@osmocom.org> Mon, 21 Aug 2023 08:35:35 +0000 libosmocore (1.8.0) unstable; urgency=medium
View file
libosmocore_1.8.0.226.aea7.tar.xz/include/osmocom/core/socket.h -> libosmocore_1.8.0.227.e8322.tar.xz/include/osmocom/core/socket.h
Changed
@@ -94,6 +94,8 @@ #define OSMO_SOCK_F_NO_MCAST_ALL (1 << 4) /*! use SO_REUSEADDR on UDP ports (required for multicast) */ #define OSMO_SOCK_F_UDP_REUSEADDR (1 << 5) +/*! use SCTP_AUTH_SUPPORTED + SCTP_ASCONF_SUPPORTED on SCTP socket (required for ASCONF / Peer Primary Address feature) */ +#define OSMO_SOCK_F_SCTP_ASCONF_SUPPORTED (1 << 6) /*! use OSMO_SOCK_F_DSCP(x) to set IP DSCP 'x' for packets transmitted on the socket */ #define OSMO_SOCK_F_DSCP(x) (((x)&0x3f) << 24)
View file
libosmocore_1.8.0.226.aea7.tar.xz/src/core/socket.c -> libosmocore_1.8.0.227.e8322.tar.xz/src/core/socket.c
Changed
@@ -696,6 +696,36 @@ return 0; } +static int setsockopt_sctp_auth_supported(int fd) +{ +#ifdef SCTP_AUTH_SUPPORTED + struct sctp_assoc_value assoc_val = { + .assoc_id = SCTP_FUTURE_ASSOC, + .assoc_value = 1, + }; + return setsockopt(fd, IPPROTO_SCTP, SCTP_AUTH_SUPPORTED, &assoc_val, sizeof(assoc_val)); +#else +#pragma message "setsockopt(SCTP_AUTH_SUPPORTED) not supported! some SCTP features may not be available!" + LOGP(DLGLOBAL, LOGL_NOTICE, "Built without support for setsockopt(SCTP_AUTH_SUPPORTED), skipping\n"); + return 0; +#endif +} + +static int setsockopt_sctp_asconf_supported(int fd) +{ +#ifdef SCTP_ASCONF_SUPPORTED + struct sctp_assoc_value assoc_val = { + .assoc_id = SCTP_FUTURE_ASSOC, + .assoc_value = 1, + }; + return setsockopt(fd, IPPROTO_SCTP, SCTP_ASCONF_SUPPORTED, &assoc_val, sizeof(assoc_val)); +#else +#pragma message "setsockopt(SCTP_ASCONF_SUPPORTED) not supported! some SCTP features may not be available!" + LOGP(DLGLOBAL, LOGL_NOTICE, "Built without support for setsockopt(SCTP_ASCONF_SUPPORTED), skipping\n"); + return 0; +#endif +} + /*! Initialize a socket (including bind and/or connect) with multiple local or remote addresses. * \paramin family Address Family like AF_INET, AF_INET6, AF_UNSPEC * \paramin type Socket type like SOCK_DGRAM, SOCK_STREAM @@ -811,6 +841,29 @@ goto ret_close; } + if (flags & OSMO_SOCK_F_SCTP_ASCONF_SUPPORTED) { + /* RFC 5061 4.2.7: ASCONF also requires AUTH feature. */ + rc = setsockopt_sctp_auth_supported(sfd); + if (rc < 0) { + int err = errno; + multiaddr_snprintf(strbuf, sizeof(strbuf), local_hosts, local_hosts_cnt); + LOGP(DLGLOBAL, LOGL_ERROR, + "cannot setsockopt(SCTP_AUTH_SUPPORTED) socket: %s:%u: %s\n", + strbuf, local_port, strerror(err)); + goto ret_close; + } + + rc = setsockopt_sctp_asconf_supported(sfd); + if (rc < 0) { + int err = errno; + multiaddr_snprintf(strbuf, sizeof(strbuf), local_hosts, local_hosts_cnt); + LOGP(DLGLOBAL, LOGL_ERROR, + "cannot setsockopt(SCTP_ASCONF_SUPPORTED) socket: %s:%u: %s\n", + strbuf, local_port, strerror(err)); + goto ret_close; + } + } + /* Build array of addresses taking first entry for each host. TODO: Ideally we should use backtracking storing last used indexes and trying next combination if connect() fails .*/
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.