On Sun, 2011-05-22 at 21:45 +0200, Harald Welte wrote:
Hi!
libosmocore >= 0.3.1 and the current osmocom-bb code will now generate
not only the sending GSMTAP UDP socket, but also a locally-bound receive
socket.
This avoids the manual start of "nc -l -u -p 4729 >/dev/null" or
iptables rules to drop the UDP packets.
The local receive socket is only created if the GSMTAP IP address is a
locally configured address on any of your network interfaces. So
sending it to 127.0.0.1 should work well.
Don't be surprised if you happen to see GSMTAP over IPv6, I'm now using
getaddrinfo() and related functions, i.e. "loopback" may now resolve to
::1 instead of 127.0.0.1
Regards,
Harald
Could these changes be related to the sudden crashes I am having since
enabling test sim in mobile (with no -i specified) ?
Following patch fixes it.
diff --git a/src/shared/libosmocore/src/gsmtap_util.c
b/src/shared/libosmocore/src/gsmtap_util.c
index 5c68b6a..2de4beb 100644
--- a/src/shared/libosmocore/src/gsmtap_util.c
+++ b/src/shared/libosmocore/src/gsmtap_util.c
@@ -148,6 +148,11 @@ int gsmtap_source_add_sink_fd(int gsmtap_fd)
int gsmtap_sendmsg(struct gsmtap_inst *gti, struct msgb *msg)
{
+ if ( NULL == gti ) {
+ msgb_free(msg);
+ return 0;
+ }
+
if (gti->ofd_wq_mode)
return osmo_wqueue_enqueue(>i->wq, msg);
else {