Change in osmo-bts[master]: virtual: Fix VTY commands to specify GSMTAP multicast groups

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/.

laforge gerrit-no-reply at lists.osmocom.org
Wed Feb 26 13:57:12 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/17271 )

Change subject: virtual: Fix VTY commands to specify GSMTAP multicast groups
......................................................................

virtual: Fix VTY commands to specify GSMTAP multicast groups

osmo-bts-virtual uses GSMTAP over multicast groups to communicate
with one or more virtphy instances.  There are some well-known default
multicast groups, but those can also be overridden via the VTY.

The problem is: If you actually try that, osmo-bts-virtual will abort,
as we try to talloc_free() when using osmo_talloc_replace_string()
on the constant default string.

The proper solution is to talloc_strdup() the constant default string
when setting the default value in bts_model_phy_link_set_defaults().

Change-Id: Ia96fea891a22e5a3c47ce658eda130ba8d4fc411
---
M src/osmo-bts-virtual/main.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  laforge: Looks good to me, approved; Verified



diff --git a/src/osmo-bts-virtual/main.c b/src/osmo-bts-virtual/main.c
index c329f3a..02b7ae9 100644
--- a/src/osmo-bts-virtual/main.c
+++ b/src/osmo-bts-virtual/main.c
@@ -119,9 +119,9 @@
 
 void bts_model_phy_link_set_defaults(struct phy_link *plink)
 {
-	plink->u.virt.bts_mcast_group = DEFAULT_BTS_MCAST_GROUP;
+	plink->u.virt.bts_mcast_group = talloc_strdup(plink, DEFAULT_BTS_MCAST_GROUP);
 	plink->u.virt.bts_mcast_port = DEFAULT_BTS_MCAST_PORT;
-	plink->u.virt.ms_mcast_group = DEFAULT_MS_MCAST_GROUP;
+	plink->u.virt.ms_mcast_group = talloc_strdup(plink, DEFAULT_MS_MCAST_GROUP);
 	plink->u.virt.ms_mcast_port = DEFAULT_MS_MCAST_PORT;
 }
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17271
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ia96fea891a22e5a3c47ce658eda130ba8d4fc411
Gerrit-Change-Number: 17271
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-CC: Jenkins Builder
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200226/c9904a27/attachment.htm>


More information about the gerrit-log mailing list