aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2018-07-18 10:48:15 +0200
committerHarald Welte <laforge@gnumonks.org>2018-07-22 07:26:52 +0000
commit12f79f6e10a0e6f4dd6d7557a9973d4658fde6ee (patch)
tree56e06425942ac4e6a062bd13c3132511d386c71d
parentbd3de187e88a54767537db24f9ebf3d809aa99f0 (diff)
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
-rw-r--r--src/osmo-bsc/chan_alloc.c3
1 files changed, 3 insertions, 0 deletions
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));
}
/*