Change in osmo-bsc[master]: chan_alloc: reset rtp voice related bits in lchan_free()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun Jul 22 07:26:52 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/10038 )

Change subject: chan_alloc: reset rtp voice related bits in lchan_free()
......................................................................

chan_alloc: reset rtp voice related bits in lchan_free()

The function lchan_free() is supposed to reset the lchan so that
it can be used by another connection. This function does not yet
reset the struct memebers in lchan->abis_ip. This may lead to
confusion if some other end re-uses that lchan and finds old RTP
voice port/ip settings there. Those data must be reset to
ensure it does accidently migrate into an unrelated conext.

- do a memset to 0 on lchan->abis_ip in lchan_free()

Change-Id: I0c99494292cd1d058a19a21413d0ddb51471c6be
Related: OS#3396
---
M src/osmo-bsc/chan_alloc.c
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/osmo-bsc/chan_alloc.c b/src/osmo-bsc/chan_alloc.c
index a24fbea..cec5846 100644
--- a/src/osmo-bsc/chan_alloc.c
+++ b/src/osmo-bsc/chan_alloc.c
@@ -539,6 +539,9 @@
 
 	/* FIXME: ts_free() the timeslot, if we're the last logical
 	 * channel using it */
+
+	/* reset RTP voice connection related data */
+	memset(&lchan->abis_ip, 0, sizeof(lchan->abis_ip));
 }
 
 /*

-- 
To view, visit https://gerrit.osmocom.org/10038
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I0c99494292cd1d058a19a21413d0ddb51471c6be
Gerrit-Change-Number: 10038
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180722/a53821f7/attachment.htm>


More information about the gerrit-log mailing list