laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/36055?usp=email )
Change subject: Make socket.c compile without libsctp support (--disable-libsctp)
......................................................................
Make socket.c compile without libsctp support (--disable-libsctp)
Change-Id: I214a16b60e0149a8b1cdcfd3c788cc56a1a40476
---
M src/core/socket.c
1 file changed, 13 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/src/core/socket.c b/src/core/socket.c
index ce73cd8..d36a5f4 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -1868,6 +1868,7 @@
return 0;
}
+#ifdef HAVE_LIBSCTP
/*! Get multiple IP addresses and/or port number on socket in separate string buffers
* \param[in] fd file descriptor of socket.
* \param[out] ip_proto IPPROTO of the socket, eg: IPPROTO_SCTP.
@@ -1956,6 +1957,7 @@
local ? sctp_freeladdrs(addrs) : sctp_freepaddrs(addrs);
return rc;
}
+#endif
/*! Get local IP address on socket
* \param[in] fd file descriptor of socket
@@ -2018,6 +2020,7 @@
return talloc_asprintf(ctx, "(%s)", str);
}
+#ifdef HAVE_LIBSCTP
/*! Format multiple IP addresses and/or port number into a combined string buffer
* \param[out] str Destination string buffer.
* \param[in] str_len sizeof(str), usually OSMO_SOCK_MULTIADDR_PEER_STR_MAXLEN.
@@ -2123,6 +2126,7 @@
return sb.chars_needed;
}
+#endif
/*! Get address/port information on socket in provided string buffer, like "r=1.2.3.4:5<->l=6.7.8.9:10".
* This does not include braces like osmo_sock_get_name().
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36055?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I214a16b60e0149a8b1cdcfd3c788cc56a1a40476
Gerrit-Change-Number: 36055
Gerrit-PatchSet: 2
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: fixeria.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/35978?usp=email )
Change subject: VTY: rename 'sctp-role' to 'transport-role', add an alias
......................................................................
Patch Set 6: Code-Review+1
(1 comment)
File tests/vty/ss7_asp_test.vty:
https://gerrit.osmocom.org/c/libosmo-sccp/+/35978/comment/44ffe174_96fa1e22
PS2, Line 425: role sg
: transport-role ser
> I am one of those people who don't like omitting default values in the output of `show running-confi […]
Done
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35978?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Iab6c898181d79a5ed2bea767ee90e55bc3af16a5
Gerrit-Change-Number: 35978
Gerrit-PatchSet: 6
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 27 Feb 2024 08:11:14 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/36079?usp=email )
Change subject: Fix critical bug in default TCP keepalive user timeout
......................................................................
Fix critical bug in default TCP keepalive user timeout
It turns out that our calculation of the TCP_USER_TIMEOUT value was
flawed in several ways:
* there should have been parenthesis around the + operator
(line->keepalive_probe_interval + line->keepalive_idle_timeout) as the
keepalive_idle_timeout is in seconds, not milli-seconds.
* in the default case, all those values are configured to -1
(E1INP_USE_DEFAULT). This means we're using
1000 * -1 * -1 + -1 = 999
i.e. just below a second which clearly is not enough for a lossy
satellite or wifi back-haul.
This fixes a regression introduced in Ia7659c209aea0d26eb37d31e771adc91b17ae668
(libosmo-abis >= 1.4.0) when TCP keepalive user timeouts became enabled
by default.
The initial support for TCP_USER_TIMEOUT was merged in
I5e7425958472aa5d758e09bfbefc7d7d37bf6f5f (libosmo-abis >= 0.7.0) but
since TCP keepalives were not yet enabled by default, only users with
explicit TCP keepalive configuration in their config files would be
affected - and then only of the second part of the bug (operator
precedence).
In addition, let's print the actually-used values to the log, helping to
spot unintended values.
Change-Id: Idca24d3e676a45d860d9eec60dc2097d8d87f3bf
Closes: OS#6375
Related: OS#5785, SYS#6801
Fixes: Ia7659c209aea0d26eb37d31e771adc91b17ae668
---
M src/input/ipaccess.c
1 file changed, 56 insertions(+), 17 deletions(-)
Approvals:
laforge: Looks good to me, approved; Verified
diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index 75d9693..22ac0ef 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -588,7 +588,7 @@
static void update_fd_settings(struct e1inp_line *line, int fd)
{
int ret;
- int val;
+ int val, idle_val, interval_val, retry_count_val, user_timeout_val;
if (line->keepalive_num_probes) {
/* Enable TCP keepalive to find out if the connection is gone */
@@ -599,33 +599,33 @@
else
LOGPIL(line, DLINP, LOGL_NOTICE, "TCP Keepalive is enabled\n");
+ idle_val = line->keepalive_idle_timeout > 0 ?
+ line->keepalive_idle_timeout :
+ DEFAULT_TCP_KEEPALIVE_IDLE_TIMEOUT;
+ interval_val = line->keepalive_probe_interval > -1 ?
+ line->keepalive_probe_interval :
+ DEFAULT_TCP_KEEPALIVE_INTERVAL;
+ retry_count_val = line->keepalive_num_probes > 0 ?
+ line->keepalive_num_probes :
+ DEFAULT_TCP_KEEPALIVE_RETRY_COUNT;
+ user_timeout_val = 1000 * retry_count_val * (interval_val + idle_val);
+ LOGPIL(line, DLINP, LOGL_NOTICE, "TCP keepalive idle_timeout=%us, interval=%us, retry_count=%u "
+ "user_timeout=%ums\n", idle_val, interval_val, retry_count_val, user_timeout_val);
/* The following options are not portable! */
- val = line->keepalive_idle_timeout > 0 ?
- line->keepalive_idle_timeout :
- DEFAULT_TCP_KEEPALIVE_IDLE_TIMEOUT;
- ret = setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &val, sizeof(val));
+ ret = setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &idle_val, sizeof(idle_val));
if (ret < 0) {
LOGPIL(line, DLINP, LOGL_ERROR, "Failed to set TCP keepalive idle time: %s\n",
strerror(errno));
}
- val = line->keepalive_probe_interval > -1 ?
- line->keepalive_probe_interval :
- DEFAULT_TCP_KEEPALIVE_INTERVAL;
- ret = setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &val, sizeof(val));
+ ret = setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &interval_val, sizeof(interval_val));
if (ret < 0) {
LOGPIL(line, DLINP, LOGL_ERROR, "Failed to set TCP keepalive interval: %s\n",
strerror(errno));
}
- val = line->keepalive_num_probes > 0 ?
- line->keepalive_num_probes :
- DEFAULT_TCP_KEEPALIVE_RETRY_COUNT;
- ret = setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT, &val, sizeof(val));
+ ret = setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT, &retry_count_val, sizeof(retry_count_val));
if (ret < 0)
LOGPIL(line, DLINP, LOGL_ERROR, "Failed to set TCP keepalive count: %s\n", strerror(errno));
- val = 1000 * line->keepalive_num_probes *
- line->keepalive_probe_interval +
- line->keepalive_idle_timeout;
- ret = setsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT, &val, sizeof(val));
+ ret = setsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT, &user_timeout_val, sizeof(user_timeout_val));
if (ret < 0)
LOGPIL(line, DLINP, LOGL_ERROR, "Failed to set TCP user timeout: %s\n", strerror(errno));
}
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36079?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Idca24d3e676a45d860d9eec60dc2097d8d87f3bf
Gerrit-Change-Number: 36079
Gerrit-PatchSet: 4
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: laforge, pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/35796?usp=email )
Change subject: Implement M3UA-over-TCP (in addition to SCTP)
......................................................................
Set Ready For Review
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35796?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I8c76d271472befacbeb998a93bbdc9e8660d9b5d
Gerrit-Change-Number: 35796
Gerrit-PatchSet: 9
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 26 Feb 2024 17:52:34 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-sccp/+/35999?usp=email
to look at the new patch set (#4).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: [RFC] osmo_sccp_simple_{client,server}(): allow passing trans_proto
......................................................................
[RFC] osmo_sccp_simple_{client,server}(): allow passing trans_proto
Change-Id: Ife62326daedaa3bf2f4d1fbff596ead209cb3656
Related: SYS#5424
---
M examples/sccp_demo_user.c
M include/osmocom/sigtran/osmo_ss7.h
M src/sccp_user.c
3 files changed, 223 insertions(+), 86 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/99/35999/4
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35999?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Ife62326daedaa3bf2f4d1fbff596ead209cb3656
Gerrit-Change-Number: 35999
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset