From 12f79f6e10a0e6f4dd6d7557a9973d4658fde6ee Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Wed, 18 Jul 2018 10:48:15 +0200 Subject: 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 --- src/osmo-bsc/chan_alloc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/osmo-bsc/chan_alloc.c b/src/osmo-bsc/chan_alloc.c index a24fbea94..cec5846d9 100644 --- a/src/osmo-bsc/chan_alloc.c +++ b/src/osmo-bsc/chan_alloc.c @@ -539,6 +539,9 @@ void lchan_free(struct gsm_lchan *lchan) /* 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)); } /* -- cgit v1.2.3