osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/34157 )
Change subject: build/Makefile.asciidoc: print less clutter
......................................................................
build/Makefile.asciidoc: print less clutter
* Move the comments above the build targets, so they don't get printed
during the build
* Remove the "TO REMOVE DRAFT MODE…" note. Printing this is no longer
useful, the manuals for releases are now generated automatically with
the Osmocom-release-manuals jenkins job, which removes the draft mode.
There is no need to do this step manually.
Depends: osmo-ci Ia27cb8e4dd0204c0a91c322bed65bf8c9847a7be
Change-Id: I23d11bab274793eb8bcedc3fd9290901823e32d2
---
M build/Makefile.asciidoc.inc
1 file changed, 28 insertions(+), 16 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/build/Makefile.asciidoc.inc b/build/Makefile.asciidoc.inc
index 848f1f1..75aa36f 100644
--- a/build/Makefile.asciidoc.inc
+++ b/build/Makefile.asciidoc.inc
@@ -59,6 +59,12 @@
all: $(ASCIIDOC_PDF)
+# ln: a2x can't use a different output file. To support out-of-tree builds,
+# we create a symlink at $(builddir)/srcfile.adoc pointing at
+# $(srcdir)/srcfile.adoc. $< is the $(srcdir)/srcfile.adoc,
+# $(notdir) is like basename from coreutils, and $(builddir) is $PWD.
+# TEXINPUTS: find LaTeX includes like \includegraphics{./common/images/sysmocom.pdf}
+# in $(OSMO_GSM_MANUALS_DIR).
$(ASCIIDOC_PDF): %.pdf: %.adoc %-docinfo.xml \
$(ASCIIDOC_DEPS) \
$(ASCIIDOCSTYLE) \
@@ -66,20 +72,10 @@
$(COMMONDIR)/images/* \
build common
- # a2x can't use a different output file. To support out-of-tree builds,
- # we create a symlink at $(builddir)/srcfile.adoc pointing at
- # $(srcdir)/srcfile.adoc. $< is the $(srcdir)/srcfile.adoc,
- # $(notdir) is like basename from coreutils, and $(builddir) is $PWD.
if ! [ -f $(notdir $<) ]; then \
ln -s $< $(notdir $<); \
fi
- # TEXINPUTS: find LaTeX includes like \includegraphics{./common/images/sysmocom.pdf}
- # in $(OSMO_GSM_MANUALS_DIR).
- @test -n "$(BUILD_RELEASE)" && echo -e "\n\n\
- NOTE: TO REMOVE DRAFT MODE, YOU NEED TO EDIT build/custom-dblatex.sty\n\
- and remove three lines starting with '% \"DRAFT\" on first page'\n" \
- || true
TEXINPUTS="$(OSMO_GSM_MANUALS_DIR)" \
a2x -vv $(A2X_OPTS) $(notdir $<)
@@ -88,23 +84,22 @@
$(MAKE) $(ASCIIDOC_CHECKS); \
fi
+# ln: out-of-tree building: use a symlink to the output file like done in
+# the non-check build above, so the relative include paths work the same.
+# touch: Make absolutely sure that the %.check target is updated.
+# grep: Do print the WARNING output but return error if any was found
+# (grep -v would omit the WARNING output from the log).
$(ASCIIDOC_CHECKS): %.check: %.adoc %-docinfo.xml \
$(ASCIIDOCSTYLE) \
$(COMMONDIR)/chapters/*.adoc \
$(ASCIIDOC_DEPS) \
build common
- # out-of-tree building: use a symlink to the output file like done in
- # the non-check build above, so the relative include paths work the
- # same.
if ! [ -f $(notdir $<) ]; then \
ln -s $< $(notdir $<); \
fi
asciidoc -v $(ASCIIDOC_OPTS) $(notdir $<) > $(notdir $@) 2>&1
- # Make absolutely sure that the %.check target is updated.
touch $(notdir $@)
- # Do print the WARNING output but return error if any was found
- # (grep -v would omit the WARNING output from the log).
@grep WARNING $(notdir $@) && exit 1 || exit 0
--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/34157
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: I23d11bab274793eb8bcedc3fd9290901823e32d2
Gerrit-Change-Number: 34157
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
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: keith, dexter.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/34150 )
Change subject: vty: include local port when dumping RTP conns
......................................................................
Patch Set 1:
(1 comment)
File src/libosmo-mgcp/mgcp_conn.c:
https://gerrit.osmocom.org/c/osmo-mgw/+/34150/comment/712e9a25_859ee55c
PS1, Line 373: "rtp:%u<->%u rtcp:%u)",
> One /could/ print the local IP here, yes, but will it ever change? There's only one bound IP for RTP […]
with ip probe enabled, the local IP address may change for each connection depending on the routing and remote ip address.
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34150
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ib89a6779e1d68c6600f00699d4303f6c0ee07132
Gerrit-Change-Number: 34150
Gerrit-PatchSet: 1
Gerrit-Owner: keith <keith(a)rhizomatica.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: keith <keith(a)rhizomatica.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 22 Aug 2023 08:03:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: keith <keith(a)rhizomatica.org>
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin, dexter.
keith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/34150 )
Change subject: vty: include local port when dumping RTP conns
......................................................................
Patch Set 1:
(1 comment)
File src/libosmo-mgcp/mgcp_conn.c:
https://gerrit.osmocom.org/c/osmo-mgw/+/34150/comment/57dcd037_8f21cc49
PS1, Line 373: "rtp:%u<->%u rtcp:%u)",
> You could also do something like "l:%s<->r:%s (rtcp: %u<->%u)" or alike.
One /could/ print the local IP here, yes, but will it ever change? There's only one bound IP for RTP in the MGW, correct?
I don't really want to get into bike shedding about it. I'm happy enough to maintain this in rhizomatica branch, or to +1 (or not) if somebody else wants to UL an alternative patch. :-)
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34150
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ib89a6779e1d68c6600f00699d4303f6c0ee07132
Gerrit-Change-Number: 34150
Gerrit-PatchSet: 1
Gerrit-Owner: keith <keith(a)rhizomatica.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 21 Aug 2023 22:29:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: comment
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/34112 )
Change subject: asp: Monitor SCTP_PEER_ADDR_CHANGE events to re-apply configured Primary Address
......................................................................
asp: Monitor SCTP_PEER_ADDR_CHANGE events to re-apply configured Primary Address
The kernel doesn't store state about a "always-preferred" Primary
address, it simply applies the requested one at the time the request is
done. If afterwards the remote address becomes unavailable, the kernel
will end up giving up on it and selecting anoter one as primary address.
If the VTY-configured Primary Address become available after a while
(signaled by the kernel in the SCTP_PEER_ADDR_CHANGE), make sure to
apply it again.
Similary, if the peer sends us an ASCONF changing our Primary Address,
we should discard that and apply/overwrite *iff* the user explicitly
VTY-configured one (kernel announces the change through
SCTP_ADDR_MADE_PRIM in this scenario).
Related: OS#6076
Change-Id: I2e54e6f9e424350474db6dec6ab604b33a03f88b
---
M src/osmo_ss7.c
1 file changed, 96 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
osmith: Looks good to me, approved
diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c
index 7882bc2..b8124d1 100644
--- a/src/osmo_ss7.c
+++ b/src/osmo_ss7.c
@@ -1478,6 +1478,76 @@
return rc;
}
+/* Returns whether the address signalled in the SCTP_PEER_ADDR_CHANGE matches
+ * the user-configured Primary Address. */
+static bool sctp_peer_addr_change_ev_addr_matches_our_primary(const struct osmo_ss7_asp *asp,
+ const union sctp_notification *notif)
+{
+ const char *primary_str;
+ int primary_str_type;
+ struct osmo_sockaddr ev_addr, primary;
+
+ OSMO_ASSERT(asp->cfg.remote.idx_primary >= 0);
+
+ primary_str = asp->cfg.remote.host[asp->cfg.remote.idx_primary];
+ primary_str_type = osmo_ip_str_type(primary_str);
+ memcpy(&ev_addr.u.sas, ¬if->sn_paddr_change.spc_aaddr, sizeof(ev_addr.u.sas));
+
+ /* This whole switch is to properly compare addresses (take into account v6mapped IPv4 addresses): */
+ switch (ev_addr.u.sa.sa_family) {
+ case AF_INET:
+ switch (primary_str_type) {
+ case AF_INET:
+ primary = ev_addr; /* Copy AF + port */
+ inet_pton(AF_INET, primary_str, &primary.u.sin.sin_addr);
+ return (osmo_sockaddr_cmp(&primary, &ev_addr) == 0);
+ case AF_INET6:
+ /* for sure not the same */
+ return false;
+ }
+ return false;
+ case AF_INET6:
+ /* "ev_addr" can either be a IPv6 addr or a v6-mapped IPv4
+ * address. Compare both as IPv6 (or v6-mapped IPv4) addresses. */
+ primary = ev_addr; /* Copy AF + port */
+ inet_pton(AF_INET6, primary_str, &primary.u.sin6.sin6_addr);
+ return (osmo_sockaddr_cmp(&primary, &ev_addr) == 0);
+ default:
+ return false;
+ }
+}
+
+/* Simple SCTP Path-manager tracking/driving the VTY-user-configured primary
+ * address against the kernel when assoc state changes: */
+static void asp_handle_sctp_notif_monitor_primary_address(const struct osmo_ss7_asp *asp,
+ const union sctp_notification *notif)
+{
+ bool match;
+
+ if (asp->cfg.remote.idx_primary == -1)
+ return;
+ if (notif->sn_header.sn_type != SCTP_PEER_ADDR_CHANGE)
+ return;
+
+ switch (notif->sn_paddr_change.spc_state) {
+ case SCTP_ADDR_AVAILABLE:
+ case SCTP_ADDR_ADDED:
+ case SCTP_ADDR_CONFIRMED:
+ /* If our primary addr became available/added/confirmed, set it */
+ match = sctp_peer_addr_change_ev_addr_matches_our_primary(asp, notif);
+ if (match)
+ asp_apply_primary_address(asp);
+ break;
+ case SCTP_ADDR_MADE_PRIM:
+ /* If another primary addr was made primary, overwrite it by setting it again */
+ match = sctp_peer_addr_change_ev_addr_matches_our_primary(asp, notif);
+ if (!match)
+ asp_apply_primary_address(asp);
+ default:
+ break;
+ }
+}
+
static bool ipv6_sctp_supported(const char *host, bool bind)
{
int rc;
@@ -2001,6 +2071,7 @@
if (flags & OSMO_STREAM_SCTP_MSG_FLAGS_NOTIFICATION) {
union sctp_notification *notif = (union sctp_notification *) msgb_data(msg);
log_sctp_notification(asp, "xUA CLNT", notif);
+ asp_handle_sctp_notif_monitor_primary_address(asp, notif);
switch (notif->sn_header.sn_type) {
case SCTP_ASSOC_CHANGE:
@@ -2147,6 +2218,7 @@
if (flags & OSMO_STREAM_SCTP_MSG_FLAGS_NOTIFICATION) {
union sctp_notification *notif = (union sctp_notification *) msgb_data(msg);
log_sctp_notification(asp, "xUA CLNT", notif);
+ asp_handle_sctp_notif_monitor_primary_address(asp, notif);
switch (notif->sn_header.sn_type) {
case SCTP_ASSOC_CHANGE:
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/34112
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I2e54e6f9e424350474db6dec6ab604b33a03f88b
Gerrit-Change-Number: 34112
Gerrit-PatchSet: 5
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: merged