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/.
dexter gerrit-no-reply at lists.osmocom.orgdexter has uploaded this change for review. ( https://gerrit.osmocom.org/10589
Change subject: osmo_mcast_sock: make sure SO_REUSEADDR is applied
......................................................................
osmo_mcast_sock: make sure SO_REUSEADDR is applied
osmo-bts-virtual uses UDP multicast to communicate with its virtphy
counterpart. At the momemnt SO_REUSEADDR is not applied for those
multicast connections because OSMO_SOCK_F_UDP_REUSEADDR is not set. This
makes prevents the proper function of UDP multicast.
- Make sure OSMO_SOCK_F_UDP_REUSEADDR is set
Change-Id: I7f27758b7aa786c8dbae669cbcde10baab8e4845
Depends: libosmocore I1399a428467ca12f1564a14eb8ffb294d4f59874
Related: OS#3497
---
M src/osmo-bts-virtual/osmo_mcast_sock.c
1 file changed, 3 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/89/10589/1
diff --git a/src/osmo-bts-virtual/osmo_mcast_sock.c b/src/osmo-bts-virtual/osmo_mcast_sock.c
index f092a73..c0f0af5 100644
--- a/src/osmo-bts-virtual/osmo_mcast_sock.c
+++ b/src/osmo-bts-virtual/osmo_mcast_sock.c
@@ -17,7 +17,7 @@
uint16_t tx_mcast_port, bool loopback)
{
int rc;
- unsigned int flags = OSMO_SOCK_F_CONNECT;
+ unsigned int flags = OSMO_SOCK_F_CONNECT | OSMO_SOCK_F_UDP_REUSEADDR;
if (!loopback)
flags |= OSMO_SOCK_F_NO_MCAST_LOOP;
@@ -41,6 +41,7 @@
void *osmo_fd_data)
{
int rc;
+ unsigned int flags = OSMO_SOCK_F_BIND | OSMO_SOCK_F_NO_MCAST_ALL | OSMO_SOCK_F_UDP_REUSEADDR;
ofd->cb = fd_rx_cb;
ofd->when = BSC_FD_READ;
@@ -48,7 +49,7 @@
/* Create mcast client socket */
rc = osmo_sock_init_ofd(ofd, AF_INET, SOCK_DGRAM, IPPROTO_UDP,
- NULL, mcast_port, OSMO_SOCK_F_BIND|OSMO_SOCK_F_NO_MCAST_ALL);
+ NULL, mcast_port, flags);
if (rc < 0) {
perror("Could not create mcast client socket");
return rc;
--
To view, visit https://gerrit.osmocom.org/10589
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7f27758b7aa786c8dbae669cbcde10baab8e4845
Gerrit-Change-Number: 10589
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180823/68e20313/attachment.htm>