mirror of https://gerrit.osmocom.org/libosmocore
gsmtap_util: make sure SO_REUSEADDR is applied for GSMTAP
When gsmtap adding a new sink it does not supply OSMO_SOCK_F_UDP_REUSEADDR in order to have SO_REUSEADDR applied. In most cases, the gsmtap sink is just receiving packets to toss them immediately, so having one of them is sufficient. However, in other use cases - particularly virt_phy - we actually want to receve and process GSMTAP messages via multicast Applying SO_REUSEADDR (like we did before disabling it globally for UDP in I4a8ffb8d598aca88801a4a0322944d7cdd8d4047 on August 1st) resolves the issue. Change-Id: I1399a428467ca12f1564a14eb8ffb294d4f59874 Related: OS#3497
This commit is contained in:
parent
73196e77fb
commit
b8a91625dd
|
@ -254,7 +254,9 @@ int gsmtap_source_add_sink_fd(int gsmtap_fd)
|
|||
|
||||
if (osmo_sockaddr_is_local((struct sockaddr *)&ss, ss_len) == 1) {
|
||||
rc = osmo_sock_init_sa((struct sockaddr *)&ss, SOCK_DGRAM,
|
||||
IPPROTO_UDP, OSMO_SOCK_F_BIND);
|
||||
IPPROTO_UDP,
|
||||
OSMO_SOCK_F_BIND |
|
||||
OSMO_SOCK_F_UDP_REUSEADDR);
|
||||
if (rc >= 0)
|
||||
return rc;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue