pespin has uploaded this change for review.
socket: Avoid aborting socket creation if setsockopt for ASCONF fails
Avoid aborting the entire socket creation, since those sockopt are fairly
new in the kernel (v5.4), and the feature can still be enabled in older
versions system-wide with sysctl. The worst it can happen is that the
ability to submit address updates (such as Peer Primary Address) doesn't
work, which is not really critical.
Related: SYS#6501
Change-Id: Iff261c8592b6b3c4237c90c84b4e8e921e3c4a65
---
M src/core/socket.c
1 file changed, 20 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/28/34228/1
diff --git a/src/core/socket.c b/src/core/socket.c
index 02d05e2..3c2ba50 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -850,7 +850,8 @@
LOGP(DLGLOBAL, LOGL_ERROR,
"cannot setsockopt(SCTP_AUTH_SUPPORTED) socket: %s:%u: %s\n",
strbuf, local_port, strerror(err));
- goto ret_close;
+ /* do not fail, some features such as Peer Primary Address won't be available
+ * unless configured system-wide through sysctl */
}
rc = setsockopt_sctp_asconf_supported(sfd);
@@ -860,7 +861,8 @@
LOGP(DLGLOBAL, LOGL_ERROR,
"cannot setsockopt(SCTP_ASCONF_SUPPORTED) socket: %s:%u: %s\n",
strbuf, local_port, strerror(err));
- goto ret_close;
+ /* do not fail, some features such as Peer Primary Address won't be available
+ * unless configured system-wide through sysctl */
}
}
To view, visit change 34228. To unsubscribe, or for help writing mail filters, visit settings.