aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2022-09-20 17:28:29 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2022-09-20 17:33:07 +0200
commitbbec5df6c7732cdd5c998468ea2bf9978cfa8e0c (patch)
treea33e9d76e30e5a1606ffe9f64348ca4379df7fef
parent9108eed3e4302574db475717d0125f409524cc5f (diff)
lchan: Reset Abis RTP/Osmux config during lchan release
Otherwise some shared variables used by both Osmux and RTP was left set, like connect_ip and connect_port, and next time the lchan was selected, those were already configured even if they didn't come in IPAC CRCX. This is specially bad if the channel was reused to set up an Osmux call, since the osmux code path relied on those fields being properly reset until set by IPAC CRCX. Change-Id: I414bd0bc801451357bb45b89197a95e51b7c97f1
-rw-r--r--src/common/lchan.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/lchan.c b/src/common/lchan.c
index 892d9b7c..0402c175 100644
--- a/src/common/lchan.c
+++ b/src/common/lchan.c
@@ -207,6 +207,8 @@ void gsm_lchan_release(struct gsm_lchan *lchan, enum lchan_rel_act_kind rel_kind
} else if (lchan->abis_ip.osmux.use) {
lchan_osmux_release(lchan);
}
+ /* reset all Abis related config: */
+ memset(&lchan->abis_ip, 0, sizeof(lchan->abis_ip));
/* FIXME: right now we allow creating the rtp_socket even if chan is not
* activated... Once we check for that, we can move this check at the