lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

September 2022

  • 2 participants
  • 1860 discussions
Change in osmo-mgw[master]: osmux: Fix memleak on error code path
by pespin 09 Sep '22

09 Sep '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29312 ) Change subject: osmux: Fix memleak on error code path ...................................................................... osmux: Fix memleak on error code path Change-Id: Ib84f78a53293799b925b645156513e129c32c705 --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/12/29312/1 diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index b393c2d..d9bccb4 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -192,6 +192,12 @@ int ret; struct msgb *msg; + if (conn->osmux.state != OSMUX_STATE_ENABLED) { + LOGPCONN(conn->conn, DOSMUX, LOGL_INFO, "forwarding RTP to Osmux conn not yet enabled, dropping (cid=%d)\n", + conn->osmux.cid); + return -1; + } + msg = msgb_alloc(4096, "RTP"); if (!msg) return -1; @@ -199,12 +205,6 @@ memcpy(msg->data, buf, buf_len); msgb_put(msg, buf_len); - if (conn->osmux.state != OSMUX_STATE_ENABLED) { - LOGPCONN(conn->conn, DOSMUX, LOGL_INFO, "forwarding RTP to Osmux conn not yet enabled, dropping (cid=%d)\n", - conn->osmux.cid); - return -1; - } - while ((ret = osmux_xfrm_input(conn->osmux.in, msg, conn->osmux.cid)) > 0) { /* batch full, build and deliver it */ osmux_xfrm_input_deliver(conn->osmux.in); -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29312 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Ib84f78a53293799b925b645156513e129c32c705 Gerrit-Change-Number: 29312 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bts[master]: Don't manually create pid file
by msuraev 09 Sep '22

09 Sep '22
Attention is currently required from: pespin. msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/29303 ) Change subject: Don't manually create pid file ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: > IMHO this shouldn't be dropped, but simply not called if "-D (daemonize)" is not used. […] What's the point of keeping dead code aroud? Do we have anything which uses that pidfile? -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/29303 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I86bcaedbc8cb1297476ad741eaa45585fea3c380 Gerrit-Change-Number: 29303 Gerrit-PatchSet: 1 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 09 Sep 2022 15:28:04 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in osmo-mgw[master]: osmux: Use osmo_sockaddr wherever possible
by pespin 09 Sep '22

09 Sep '22
Attention is currently required from: pespin. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-mgw/+/29309 to look at the new patch set (#2). Change subject: osmux: Use osmo_sockaddr wherever possible ...................................................................... osmux: Use osmo_sockaddr wherever possible This cleans up all the code, and makes it a lot easier to add IPv6 support later on (mostly only a matter of adding an IPv6 bind address in VTY). Similar changes were done to the Osmux code being added to osmo-bts. Related: SYS#5987 Change-Id: I5a100fc654f88d29b2bcd85889a5a92aef3d576d --- M include/osmocom/mgcp/osmux.h M src/libosmo-mgcp/mgcp_osmux.c 2 files changed, 59 insertions(+), 55 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/09/29309/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29309 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I5a100fc654f88d29b2bcd85889a5a92aef3d576d Gerrit-Change-Number: 29309 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmo-mgw[master]: osmux: Log refcounting of osmux_handle_list
by pespin 09 Sep '22

09 Sep '22
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-mgw/+/29310 to look at the new patch set (#2). Change subject: osmux: Log refcounting of osmux_handle_list ...................................................................... osmux: Log refcounting of osmux_handle_list Change-Id: Ia873e3021078976748762baaf406865149b2a090 --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 7 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/10/29310/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29310 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Ia873e3021078976748762baaf406865149b2a090 Gerrit-Change-Number: 29310 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmo-bts[master]: Don't manually create pid file
by pespin 09 Sep '22

09 Sep '22
Attention is currently required from: msuraev. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/29303 ) Change subject: Don't manually create pid file ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: IMHO this shouldn't be dropped, but simply not called if "-D (daemonize)" is not used. That should be enough. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/29303 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I86bcaedbc8cb1297476ad741eaa45585fea3c380 Gerrit-Change-Number: 29303 Gerrit-PatchSet: 1 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Fri, 09 Sep 2022 15:14:01 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in osmo-hlr[master]: Ignore .deb build byproducts
by pespin 09 Sep '22

09 Sep '22
Attention is currently required from: msuraev. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/29308 ) Change subject: Ignore .deb build byproducts ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/29308 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Id36f55cd55be25f764c2b9515eff84d106bab1dc Gerrit-Change-Number: 29308 Gerrit-PatchSet: 1 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Fri, 09 Sep 2022 15:13:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bts[master]: Introduce Osmux support
by pespin 09 Sep '22

09 Sep '22
Attention is currently required from: pespin. Hello Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/29285 to look at the new patch set (#3). Change subject: Introduce Osmux support ...................................................................... Introduce Osmux support Related: SYS#5987 Requires: libosmo-netif.git Change-Id I632654221826340423e1e97b0f8ed9a2baf6c6c3 Change-Id: Ib80be434c06d07b3611bd18ae25dff8b14a7aad9 --- M TODO-RELEASE M configure.ac A doc/manuals/chapters/osmux_bts.adoc M doc/manuals/osmobts-usermanual.adoc M include/osmo-bts/Makefile.am M include/osmo-bts/bts.h M include/osmo-bts/l1sap.h M include/osmo-bts/lchan.h M include/osmo-bts/logging.h A include/osmo-bts/osmux.h M include/osmo-bts/vty.h M src/common/Makefile.am M src/common/bts.c M src/common/l1sap.c M src/common/lchan.c M src/common/logging.c M src/common/main.c A src/common/osmux.c M src/common/rsl.c M src/common/vty.c 20 files changed, 882 insertions(+), 46 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/85/29285/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/29285 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ib80be434c06d07b3611bd18ae25dff8b14a7aad9 Gerrit-Change-Number: 29285 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmo-mgw[master]: osmux: Log refcounting of osmux_handle_list
by pespin 09 Sep '22

09 Sep '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29310 ) Change subject: osmux: Log refcounting of osmux_handle_list ...................................................................... osmux: Log refcounting of osmux_handle_list Change-Id: Ia873e3021078976748762baaf406865149b2a090 --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 6 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/10/29310/1 diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 428a353..d9c3ffd 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -78,10 +78,10 @@ llist_for_each_entry(h, &osmux_handle_list, head) { if (osmo_sockaddr_cmp(&h->rem_addr, rem_addr) == 0) { - LOGP(DOSMUX, LOGL_DEBUG, - "Using existing OSMUX handle for rem_addr=%s\n", - osmo_sockaddr_to_str(rem_addr)); h->refcnt++; + LOGP(DOSMUX, LOGL_DEBUG, + "Using existing OSMUX handle for addr=%s (rfcnt=%u)\n", + osmo_sockaddr_to_str(rem_addr), h->refcnt); return h; } } @@ -96,6 +96,9 @@ llist_for_each_entry(h, &osmux_handle_list, head) { if (h->in == in) { + LOGP(DOSMUX, LOGL_DEBUG, + "Putting existing OSMUX handle for addr=%s (rfcnt=%u)\n", + osmo_sockaddr_to_str(&h->rem_addr), h->refcnt); if (--h->refcnt == 0) { LOGP(DOSMUX, LOGL_INFO, "Releasing unused osmux handle for %s\n", -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29310 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Ia873e3021078976748762baaf406865149b2a090 Gerrit-Change-Number: 29310 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-mgw[master]: osmux: Use osmo_sockaddr wherever possible
by pespin 09 Sep '22

09 Sep '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29309 ) Change subject: osmux: Use osmo_sockaddr wherever possible ...................................................................... osmux: Use osmo_sockaddr wherever possible This cleans up all the code, and makes it a lot easier to add IPv6 support later on (mostly only a matter of adding an IPv6 bind address in VTY). Similar changes were done to the Osmux code being added to osmo-bts. Related: SYS#5987 Change-Id: I5a100fc654f88d29b2bcd85889a5a92aef3d576d --- M include/osmocom/mgcp/osmux.h M src/libosmo-mgcp/mgcp_osmux.c 2 files changed, 59 insertions(+), 55 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/09/29309/1 diff --git a/include/osmocom/mgcp/osmux.h b/include/osmocom/mgcp/osmux.h index f138901..62245a9 100644 --- a/include/osmocom/mgcp/osmux.h +++ b/include/osmocom/mgcp/osmux.h @@ -11,7 +11,7 @@ int osmux_init(int role, struct mgcp_config *cfg); int osmux_enable_conn(struct mgcp_endpoint *endp, struct mgcp_conn_rtp *conn, - struct osmo_sockaddr *addr, uint16_t port); + const struct osmo_sockaddr *addr); void conn_osmux_disable(struct mgcp_conn_rtp *conn); int conn_osmux_allocate_cid(struct mgcp_conn_rtp *conn, int osmux_cid); void conn_osmux_release_cid(struct mgcp_conn_rtp *conn); diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 287fa7c..428a353 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -38,8 +38,7 @@ struct llist_head head; struct mgcp_conn_rtp *conn; struct osmux_in_handle *in; - struct in_addr rem_addr; - int rem_port; /* network byte order */ + struct osmo_sockaddr rem_addr; int refcnt; }; @@ -50,31 +49,38 @@ { struct osmux_handle *handle = data; struct mgcp_conn_rtp *conn = handle->conn; + socklen_t dest_len; - if (conn->end.output_enabled) { - struct sockaddr_in out = { - .sin_family = AF_INET, - .sin_port = handle->rem_port, - }; - memcpy(&out.sin_addr, &handle->rem_addr, sizeof(handle->rem_addr)); - sendto(osmux_fd.fd, batch_msg->data, batch_msg->len, 0, - (struct sockaddr *)&out, sizeof(out)); + if (!conn->end.output_enabled) { + msgb_free(batch_msg); + return; } + + switch (handle->rem_addr.u.sa.sa_family) { + case AF_INET6: + dest_len = sizeof(handle->rem_addr.u.sin6); + break; + case AF_INET: + default: + dest_len = sizeof(handle->rem_addr.u.sin); + break; + } + sendto(osmux_fd.fd, batch_msg->data, batch_msg->len, 0, + (struct sockaddr *)&handle->rem_addr.u.sa, dest_len); msgb_free(batch_msg); } /* Lookup existing OSMUX handle for specified destination address. */ static struct osmux_handle * -osmux_handle_find_get(struct in_addr *addr, int rem_port) +osmux_handle_find_get(const struct osmo_sockaddr *rem_addr) { struct osmux_handle *h; llist_for_each_entry(h, &osmux_handle_list, head) { - if (memcmp(&h->rem_addr, addr, sizeof(struct in_addr)) == 0 && - h->rem_port == rem_port) { - LOGP(DOSMUX, LOGL_DEBUG, "using existing OSMUX handle " - "for addr=%s:%d\n", - inet_ntoa(*addr), ntohs(rem_port)); + if (osmo_sockaddr_cmp(&h->rem_addr, rem_addr) == 0) { + LOGP(DOSMUX, LOGL_DEBUG, + "Using existing OSMUX handle for rem_addr=%s\n", + osmo_sockaddr_to_str(rem_addr)); h->refcnt++; return h; } @@ -92,9 +98,8 @@ if (h->in == in) { if (--h->refcnt == 0) { LOGP(DOSMUX, LOGL_INFO, - "Releasing unused osmux handle for %s:%d\n", - inet_ntoa(h->rem_addr), - ntohs(h->rem_port)); + "Releasing unused osmux handle for %s\n", + osmo_sockaddr_to_str(&h->rem_addr)); LOGP(DOSMUX, LOGL_INFO, "Stats: " "input RTP msgs: %u bytes: %"PRIu64" " "output osmux msgs: %u bytes: %"PRIu64"\n", @@ -109,12 +114,12 @@ return; } } - LOGP(DOSMUX, LOGL_ERROR, "cannot find Osmux input handle %p\n", in); + LOGP(DOSMUX, LOGL_ERROR, "Cannot find Osmux input handle %p\n", in); } /* Allocate free OSMUX handle */ static struct osmux_handle * -osmux_handle_alloc(struct mgcp_conn_rtp *conn, struct in_addr *addr, int rem_port) +osmux_handle_alloc(struct mgcp_conn_rtp *conn, const struct osmo_sockaddr *rem_addr) { struct osmux_handle *h; struct mgcp_config *cfg = conn->conn->endp->trunk->cfg; @@ -123,8 +128,7 @@ if (!h) return NULL; h->conn = conn; - h->rem_addr = *addr; - h->rem_port = rem_port; + h->rem_addr = *rem_addr; h->refcnt++; h->in = talloc_zero(h, struct osmux_in_handle); @@ -146,8 +150,8 @@ llist_add(&h->head, &osmux_handle_list); - LOGP(DOSMUX, LOGL_DEBUG, "created new OSMUX handle for addr=%s:%d\n", - inet_ntoa(*addr), ntohs(rem_port)); + LOGP(DOSMUX, LOGL_DEBUG, "Created new OSMUX handle for rem_addr=%s\n", + osmo_sockaddr_to_str(rem_addr)); return h; } @@ -155,20 +159,20 @@ /* Lookup existing handle for a specified address, if the handle can not be * found, the function will automatically allocate one */ static struct osmux_in_handle * -osmux_handle_find_or_create(struct mgcp_conn_rtp *conn, struct osmo_sockaddr *addr, int rem_port) +osmux_handle_find_or_create(struct mgcp_conn_rtp *conn, const struct osmo_sockaddr *rem_addr) { struct osmux_handle *h; - if (addr->u.sa.sa_family != AF_INET) { + if (rem_addr->u.sa.sa_family != AF_INET) { LOGP(DOSMUX, LOGL_DEBUG, "IPv6 not supported in osmux yet!\n"); return NULL; } - h = osmux_handle_find_get(&addr->u.sin.sin_addr, rem_port); + h = osmux_handle_find_get(rem_addr); if (h != NULL) return h->in; - h = osmux_handle_alloc(conn, &addr->u.sin.sin_addr, rem_port); + h = osmux_handle_alloc(conn, rem_addr); if (h == NULL) return NULL; @@ -207,8 +211,7 @@ /* Lookup the endpoint that corresponds to the specified address (port) */ static struct mgcp_conn_rtp* -osmux_conn_lookup(struct mgcp_config *cfg, uint8_t cid, - struct in_addr *from_addr) +osmux_conn_lookup(struct mgcp_config *cfg, uint8_t cid, const struct osmo_sockaddr *rem_addr) { struct mgcp_trunk *trunk = mgcp_trunk_by_num(cfg, MGCP_TRUNK_VIRTUAL, MGCP_VIRT_TRUNK_ID); struct mgcp_endpoint *endp; @@ -228,12 +231,15 @@ if (!mgcp_conn_rtp_is_osmux(conn_rtp)) continue; + /* FIXME: Match remote address! */ + if (conn_rtp->osmux.cid == cid) return conn_rtp; } } - LOGP(DOSMUX, LOGL_ERROR, "Cannot find osmux conn with cid=%d\n", cid); + LOGP(DOSMUX, LOGL_ERROR, "Cannot find osmux conn with rem_addr=%s cid=%d\n", + osmo_sockaddr_to_str(rem_addr), cid); return NULL; } @@ -260,10 +266,10 @@ msgb_free(msg); } -static struct msgb *osmux_recv(struct osmo_fd *ofd, struct sockaddr_in *addr) +static struct msgb *osmux_recv(struct osmo_fd *ofd, struct osmo_sockaddr *addr) { struct msgb *msg; - socklen_t slen = sizeof(*addr); + socklen_t slen = sizeof(addr->u.sas); int ret; msg = msgb_alloc(4096, "OSMUX"); @@ -271,8 +277,7 @@ LOGP(DOSMUX, LOGL_ERROR, "cannot allocate message\n"); return NULL; } - ret = recvfrom(ofd->fd, msg->data, msg->data_len, 0, - (struct sockaddr *)addr, &slen); + ret = recvfrom(ofd->fd, msg->data, msg->data_len, 0, &addr->u.sa, &slen); if (ret <= 0) { msgb_free(msg); LOGP(DOSMUX, LOGL_ERROR, "cannot receive message\n"); @@ -287,11 +292,13 @@ static int endp_osmux_state_check(struct mgcp_endpoint *endp, struct mgcp_conn_rtp *conn, bool sending) { - char ipbuf[INET6_ADDRSTRLEN]; + struct osmo_sockaddr rem_addr; switch(conn->osmux.state) { case OSMUX_STATE_ACTIVATING: - if (osmux_enable_conn(endp, conn, &conn->end.addr, conn->end.rtp_port) < 0) { + rem_addr = conn->end.addr; + osmo_sockaddr_set_port(&rem_addr.u.sa, conn->end.rtp_port); + if (osmux_enable_conn(endp, conn, &rem_addr) < 0) { LOGPCONN(conn->conn, DOSMUX, LOGL_ERROR, "Could not enable osmux for conn on %s: %s\n", sending ? "sent" : "received", @@ -299,11 +306,9 @@ return -1; } LOGPCONN(conn->conn, DOSMUX, LOGL_ERROR, - "Osmux %s CID %u towards %s:%u is now enabled\n", + "Osmux %s CID %u towards %s is now enabled\n", sending ? "sent" : "received", - conn->osmux.cid, - osmo_sockaddr_ntop(&conn->end.addr.u.sa, ipbuf), - ntohs(conn->end.rtp_port)); + conn->osmux.cid, osmo_sockaddr_to_str(&rem_addr)); return 0; case OSMUX_STATE_ENABLED: return 0; @@ -316,7 +321,7 @@ } } -static int osmux_legacy_dummy_parse_cid(struct sockaddr_in *addr, struct msgb *msg, +static int osmux_legacy_dummy_parse_cid(const struct osmo_sockaddr *rem_addr, struct msgb *msg, uint8_t *osmux_cid) { if (msg->len < 1 + sizeof(*osmux_cid)) { @@ -331,16 +336,16 @@ } /* This is called from the bsc-nat */ -static int osmux_handle_dummy(struct mgcp_config *cfg, struct sockaddr_in *addr, +static int osmux_handle_dummy(struct mgcp_config *cfg, const struct osmo_sockaddr *rem_addr, struct msgb *msg) { uint8_t osmux_cid; struct mgcp_conn_rtp *conn; - if (osmux_legacy_dummy_parse_cid(addr, msg, &osmux_cid) < 0) + if (osmux_legacy_dummy_parse_cid(rem_addr, msg, &osmux_cid) < 0) goto out; - conn = osmux_conn_lookup(cfg, osmux_cid, &addr->sin_addr); + conn = osmux_conn_lookup(cfg, osmux_cid, rem_addr); if (!conn) { LOGP(DOSMUX, LOGL_ERROR, "Cannot find conn for Osmux CID %d\n", osmux_cid); @@ -360,12 +365,12 @@ { struct msgb *msg; struct osmux_hdr *osmuxh; - struct sockaddr_in addr; + struct osmo_sockaddr rem_addr; struct mgcp_config *cfg = ofd->data; uint32_t rem; struct mgcp_conn_rtp *conn_src; - msg = osmux_recv(ofd, &addr); + msg = osmux_recv(ofd, &rem_addr); if (!msg) return -1; @@ -377,13 +382,13 @@ /* not any further processing dummy messages */ if (mgcp_is_rtp_dummy_payload(msg)) - return osmux_handle_dummy(cfg, &addr, msg); + return osmux_handle_dummy(cfg, &rem_addr, msg); rem = msg->len; while((osmuxh = osmux_xfrm_output_pull(msg)) != NULL) { conn_src = osmux_conn_lookup(cfg, osmuxh->circuit_id, - &addr.sin_addr); + &rem_addr); if (!conn_src) { LOGP(DOSMUX, LOGL_ERROR, "Cannot find a src conn for circuit_id=%d\n", @@ -444,11 +449,10 @@ /*! enable OSXMUX circuit for a specified connection. * \param[in] endp mgcp endpoint (configuration) * \param[in] conn connection to disable - * \param[in] addr IP address of remote OSMUX endpoint - * \param[in] port portnumber of the remote OSMUX endpoint (in network byte order) + * \param[in] addr IP address and port of remote OSMUX endpoint * \returns 0 on success, -1 on ERROR */ int osmux_enable_conn(struct mgcp_endpoint *endp, struct mgcp_conn_rtp *conn, - struct osmo_sockaddr *addr, uint16_t port) + const struct osmo_sockaddr *rem_addr) { /*! If osmux is enabled, initialize the output handler. This handler is * used to reconstruct the RTP flow from osmux. The RTP SSRC is @@ -481,7 +485,7 @@ return -1; } - conn->osmux.in = osmux_handle_find_or_create(conn, addr, port); + conn->osmux.in = osmux_handle_find_or_create(conn, rem_addr); if (!conn->osmux.in) { LOGPCONN(conn->conn, DOSMUX, LOGL_ERROR, "Cannot allocate input osmux handle for conn:%s\n", -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29309 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I5a100fc654f88d29b2bcd85889a5a92aef3d576d Gerrit-Change-Number: 29309 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-hlr[master]: Ignore .deb build byproducts
by msuraev 09 Sep '22

09 Sep '22
msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/29308 ) Change subject: Ignore .deb build byproducts ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/29308 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Id36f55cd55be25f764c2b9515eff84d106bab1dc Gerrit-Change-Number: 29308 Gerrit-PatchSet: 1 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Fri, 09 Sep 2022 15:09:16 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • ...
  • 186
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.