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-bts[master]: tests/*/Makefile.am: Add missing libosmo-netif cflags
by pespin 12 Sep '22

12 Sep '22
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/29324 to look at the new patch set (#2). Change subject: tests/*/Makefile.am: Add missing libosmo-netif cflags ...................................................................... tests/*/Makefile.am: Add missing libosmo-netif cflags Change-Id: I7a2a846c2d68a4d6d77c4be62969238069d6cf95 --- M tests/amr/Makefile.am M tests/ta_control/Makefile.am 2 files changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/24/29324/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/29324 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I7a2a846c2d68a4d6d77c4be62969238069d6cf95 Gerrit-Change-Number: 29324 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]: tests/ta_control/Makefile.am: Add missing libosmo-netif cflags
by pespin 12 Sep '22

12 Sep '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/29324 ) Change subject: tests/ta_control/Makefile.am: Add missing libosmo-netif cflags ...................................................................... tests/ta_control/Makefile.am: Add missing libosmo-netif cflags Change-Id: I7a2a846c2d68a4d6d77c4be62969238069d6cf95 --- M tests/ta_control/Makefile.am 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/24/29324/1 diff --git a/tests/ta_control/Makefile.am b/tests/ta_control/Makefile.am index e249438..f28ae1d 100644 --- a/tests/ta_control/Makefile.am +++ b/tests/ta_control/Makefile.am @@ -6,6 +6,7 @@ $(LIBOSMOCODEC_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(LIBOSMOTRAU_CFLAGS) \ + $(LIBOSMONETIF_CFLAGS) \ $(NULL) LDADD = \ $(LIBOSMOCORE_LIBS) \ @@ -13,6 +14,7 @@ $(LIBOSMOCODEC_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOTRAU_LIBS) \ + $(LIBOSMONETIF_LIBS) \ $(NULL) check_PROGRAMS = ta_control_test -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/29324 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I7a2a846c2d68a4d6d77c4be62969238069d6cf95 Gerrit-Change-Number: 29324 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bts[master]: tests/*/Makefile.am: Fix typo in LIBOSMONETIF_CFLAGS
by pespin 12 Sep '22

12 Sep '22
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/29322 to look at the new patch set (#2). Change subject: tests/*/Makefile.am: Fix typo in LIBOSMONETIF_CFLAGS ...................................................................... tests/*/Makefile.am: Fix typo in LIBOSMONETIF_CFLAGS Change-Id: I29d52bdacdebc0495d11425399e796fa7aef3ac4 --- M tests/agch/Makefile.am M tests/handover/Makefile.am M tests/meas/Makefile.am M tests/misc/Makefile.am M tests/power/Makefile.am M tests/sysmobts/Makefile.am M tests/tx_power/Makefile.am 7 files changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/22/29322/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/29322 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I29d52bdacdebc0495d11425399e796fa7aef3ac4 Gerrit-Change-Number: 29322 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
1 0
0 0
Change in libosmo-netif[master]: stream: Fix typos in log messages
by pespin 12 Sep '22

12 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/libosmo-netif/+/29323 to look at the new patch set (#2). Change subject: stream: Fix typos in log messages ...................................................................... stream: Fix typos in log messages Change-Id: I9e49e222c254c89d182402501024badfd3bf9d9c --- M src/stream.c M tests/stream/stream_test.err 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/23/29323/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/29323 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I9e49e222c254c89d182402501024badfd3bf9d9c Gerrit-Change-Number: 29323 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 libosmo-netif[master]: stream: Fix typos in log messages
by pespin 12 Sep '22

12 Sep '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/29323 ) Change subject: stream: Fix typos in log messages ...................................................................... stream: Fix typos in log messages Change-Id: I9e49e222c254c89d182402501024badfd3bf9d9c --- M src/stream.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/23/29323/1 diff --git a/src/stream.c b/src/stream.c index a7053e9..f090c4f 100644 --- a/src/stream.c +++ b/src/stream.c @@ -1550,11 +1550,11 @@ if (ret < 0) { if (errno == EPIPE || errno == ECONNRESET) { LOGP(DLINP, LOGL_ERROR, - "lost connection with srv\n"); + "lost connection with client\n"); } return ret; } else if (ret == 0) { - LOGP(DLINP, LOGL_ERROR, "connection closed with srv\n"); + LOGP(DLINP, LOGL_ERROR, "connection closed with client\n"); return ret; } msgb_put(msg, ret); -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/29323 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I9e49e222c254c89d182402501024badfd3bf9d9c Gerrit-Change-Number: 29323 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-mgw[master]: osmux: don't store conn ptr inside shared osmux_handle
by pespin 12 Sep '22

12 Sep '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29318 ) Change subject: osmux: don't store conn ptr inside shared osmux_handle ...................................................................... osmux: don't store conn ptr inside shared osmux_handle The struct osmux_handle is a shared structure which goes together 1-1 with libosmo-netif's struct osmux_in_handle, which is common to all CIDs to be muxed together. Hence, it makes no sense to store a specific conn object to it, since it actually manages several of them. Hence, all the conn specific stuff must be handled beforehand, not at osmux deliver time. Related: SYS#5987 Change-Id: Ie739b556e9eb7d3133e798831a09728c7cc87135 --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 3 insertions(+), 8 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 4d1ec72..51a4b9c 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -36,7 +36,6 @@ struct osmux_handle { struct llist_head head; - struct mgcp_conn_rtp *conn; struct osmux_in_handle *in; struct osmo_sockaddr rem_addr; int refcnt; @@ -48,14 +47,8 @@ static void osmux_deliver_cb(struct msgb *batch_msg, void *data) { struct osmux_handle *handle = data; - struct mgcp_conn_rtp *conn = handle->conn; socklen_t dest_len; - 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); @@ -130,7 +123,6 @@ h = talloc_zero(osmux, struct osmux_handle); if (!h) return NULL; - h->conn = conn; h->rem_addr = *rem_addr; h->refcnt++; @@ -192,6 +184,9 @@ int ret; struct msgb *msg; + if (!conn->end.output_enabled) + return -1; + 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); -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29318 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Ie739b556e9eb7d3133e798831a09728c7cc87135 Gerrit-Change-Number: 29318 Gerrit-PatchSet: 2 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-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-mgw[master]: osmux: Use osmo_sockaddr wherever possible
by pespin 12 Sep '22

12 Sep '22
pespin has submitted this change. ( 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(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved 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..17acc9a 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, ntohs(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: 3 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-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-mgw[master]: osmux: Log refcounting of osmux_handle_list
by pespin 12 Sep '22

12 Sep '22
pespin has submitted this change. ( 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(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 17acc9a..b635aef 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: 4 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-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-mgw[master]: osmux: Fix memleak on error code path
by pespin 12 Sep '22

12 Sep '22
pespin has submitted this change. ( 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(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index b635aef..4d1ec72 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: 2 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-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-mgw[master]: osmux: don't store conn ptr inside shared osmux_handle
by pespin 12 Sep '22

12 Sep '22
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29318 ) Change subject: osmux: don't store conn ptr inside shared osmux_handle ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29318 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Ie739b556e9eb7d3133e798831a09728c7cc87135 Gerrit-Change-Number: 29318 Gerrit-PatchSet: 2 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-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 12 Sep 2022 10:25:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • ...
  • 186
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.