Change in osmo-mgw[master]: mgcp_client: logging tweaks

2018-12-11 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/12270


Change subject: mgcp_client: logging tweaks
..

mgcp_client: logging tweaks

Fix typos, use osmo_sock_get_name2() to show the tx source and target IP:port,
shorten some wording.

Depends: I8ad89ac447c9c582742e70d082072bdd40a5a398 (libosmocore)
Change-Id: Iae728192f499330d16836d9435648f6b8ed213b6
---
M src/libosmo-mgcp-client/mgcp_client.c
1 file changed, 12 insertions(+), 12 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/70/12270/1

diff --git a/src/libosmo-mgcp-client/mgcp_client.c 
b/src/libosmo-mgcp-client/mgcp_client.c
index fc9c5d3..f5eee95 100644
--- a/src/libosmo-mgcp-client/mgcp_client.c
+++ b/src/libosmo-mgcp-client/mgcp_client.c
@@ -717,11 +717,13 @@

ret = read(fd->fd, msg->data, 4096 - 128);
if (ret <= 0) {
-   LOGP(DLMGCP, LOGL_ERROR, "Failed to read: %d/%s\n", errno, 
strerror(errno));
+   LOGP(DLMGCP, LOGL_ERROR, "Failed to read: %s: %d='%s'\n", 
osmo_sock_get_name2(fd->fd),
+errno, strerror(errno));
+
msgb_free(msg);
return -1;
} else if (ret > 4096 - 128) {
-   LOGP(DLMGCP, LOGL_ERROR, "Too much data: %d\n", ret);
+   LOGP(DLMGCP, LOGL_ERROR, "Too much data: %s: %d\n", 
osmo_sock_get_name2(fd->fd), ret);
msgb_free(msg);
return -1;
}
@@ -736,13 +738,13 @@
 {
int ret;

-   LOGP(DLMGCP, LOGL_DEBUG, "Sending msg to MGCP GW size: len=%u 
'%s'...\n",
-msg->len, osmo_escape_str((const char*)msg->data, OSMO_MIN(42, 
msg->len)));
+   LOGP(DLMGCP, LOGL_DEBUG, "Tx MGCP: %s: len=%u '%s'...\n",
+osmo_sock_get_name2(fd->fd), msg->len, osmo_escape_str((const 
char*)msg->data, OSMO_MIN(42, msg->len)));

ret = write(fd->fd, msg->data, msg->len);
if (ret != msg->len)
-   LOGP(DLMGCP, LOGL_ERROR, "Failed to Tx MGCP: %d='%s'; msg: 
len=%u '%s'...\n",
-errno, strerror(errno),
+   LOGP(DLMGCP, LOGL_ERROR, "Failed to Tx MGCP: %s: %d='%s'; msg: 
len=%u '%s'...\n",
+osmo_sock_get_name2(fd->fd), errno, strerror(errno),
 msg->len, osmo_escape_str((const char*)msg->data, 
OSMO_MIN(42, msg->len)));
return ret;
 }
@@ -803,12 +805,12 @@

/* Choose a new port number to try next */
LOGP(DLMGCP, LOGL_NOTICE,
-"MGCPGW faild to bind to port %u, retrying with port %u -- 
check configuration!\n",
-mgcp->actual.local_port, mgcp->actual.local_port + 1);
+"MGCPGW failed to bind to %s:%u, retrying with port %u\n",
+mgcp->actual.local_addr, mgcp->actual.local_port, 
mgcp->actual.local_port + 1);
mgcp->actual.local_port++;
}

-   LOGP(DLMGCP, LOGL_FATAL, "MGCPGW faild to find a port to bind on %i 
times.\n", i);
+   LOGP(DLMGCP, LOGL_FATAL, "MGCPGW failed to find a port to bind on %i 
times.\n", i);
return -EINVAL;
 }

@@ -846,9 +848,7 @@
wq->read_cb = mgcp_do_read;
wq->write_cb = mgcp_do_write;

-   LOGP(DLMGCP, LOGL_INFO, "MGCP GW connection: %s:%u -> %s:%u\n",
-mgcp->actual.local_addr, mgcp->actual.local_port,
-mgcp->actual.remote_addr, mgcp->actual.remote_port);
+   LOGP(DLMGCP, LOGL_INFO, "MGCP GW connection: %s\n", 
osmo_sock_get_name2(wq->bfd.fd));

return 0;
 error_close_fd:

--
To view, visit https://gerrit.osmocom.org/12270
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iae728192f499330d16836d9435648f6b8ed213b6
Gerrit-Change-Number: 12270
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in osmo-mgw[master]: drop/replace very weird logging in mgcp_client.c

2018-12-11 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/12269


Change subject: drop/replace very weird logging in mgcp_client.c
..

drop/replace very weird logging in mgcp_client.c

mgcp_do_write() is the final stage of writing data towards the MGCP server
(MGW). In that function, drop an unconditional iteration and copy of the MGCP
message to a static string buffer for no apparent reason besides debug logging.

Instead, use osmo_escape_str() with a limited length, which can just be an
inline format argument in the LOGP() statement. This way, the string mangling
is simpler and only gets run when DMGCP is actually on debug log level.

Change-Id: Id6877ed7fd7dbe009b2ece8792d5160d040c1aaa
---
M src/libosmo-mgcp-client/mgcp_client.c
1 file changed, 5 insertions(+), 16 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/69/12269/1

diff --git a/src/libosmo-mgcp-client/mgcp_client.c 
b/src/libosmo-mgcp-client/mgcp_client.c
index 2a8cc15..fc9c5d3 100644
--- a/src/libosmo-mgcp-client/mgcp_client.c
+++ b/src/libosmo-mgcp-client/mgcp_client.c
@@ -735,26 +735,15 @@
 static int mgcp_do_write(struct osmo_fd *fd, struct msgb *msg)
 {
int ret;
-   static char strbuf[4096];
-   unsigned int l = msg->len < sizeof(strbuf) ? msg->len : sizeof(strbuf);
-   unsigned int i;

-   osmo_strlcpy(strbuf, (const char*)msg->data, l);
-   for (i = 0; i < sizeof(strbuf); i++) {
-   if (strbuf[i] == '\n' || strbuf[i] == '\r') {
-   strbuf[i] = '\0';
-   break;
-   }
-   }
-   DEBUGP(DLMGCP, "Tx MGCP msg to MGCP GW: '%s'\n", strbuf);
-
-   LOGP(DLMGCP, LOGL_DEBUG, "Sending msg to MGCP GW size: %u\n", msg->len);
+   LOGP(DLMGCP, LOGL_DEBUG, "Sending msg to MGCP GW size: len=%u 
'%s'...\n",
+msg->len, osmo_escape_str((const char*)msg->data, OSMO_MIN(42, 
msg->len)));

ret = write(fd->fd, msg->data, msg->len);
if (ret != msg->len)
-   LOGP(DLMGCP, LOGL_ERROR, "Failed to forward message to MGCP"
-" GW: %s\n", strerror(errno));
-
+   LOGP(DLMGCP, LOGL_ERROR, "Failed to Tx MGCP: %d='%s'; msg: 
len=%u '%s'...\n",
+errno, strerror(errno),
+msg->len, osmo_escape_str((const char*)msg->data, 
OSMO_MIN(42, msg->len)));
return ret;
 }


--
To view, visit https://gerrit.osmocom.org/12269
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id6877ed7fd7dbe009b2ece8792d5160d040c1aaa
Gerrit-Change-Number: 12269
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in libosmocore[master]: add to osmo_sock_get_name*() API

2018-12-11 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/12268


Change subject: add to osmo_sock_get_name*() API
..

add to osmo_sock_get_name*() API

Basically, I am applying code review that I would have given had I not been on
vacation when the last osmo_sock_get_name* stuff was merged.

osmo_sock_get_name2() is so far a static internal function. However, it is
nothing like osmo_sock_get_name(), so instead rename it to
osmo_sock_get_ip_and_port(). Also make it public API, no need to hide it.  I'm
adding an "and" in the name to hopefully clarify: "ip_port" vs. "ip_and_port"
-- there already are _get_X_ip_port() functions that only return the port
string, despite "ip" in the name.

Add new public osmo_sock_get_name2(), which is like osmo_sock_get_name(),
except it uses a static string instead of talloc, and omits the braces. This
is most convenient for log statement formats, avoiding dyn allocations.

Add new osmo_sock_get_name2_buf(), which is like osmo_sock_get_name2() but
writes to a caller provided char buffer. Technically this should be called
osmo_sock_get_name_buf() without '2', but that would be quite confusing.

Use osmo_sock_get_name2_buf() in the implementation of osmo_sock_get_name(),
but use another (non-static) local string buffer, because adding braces is too
complex without talloc_snprintf().

Rationale:

I want to improve the logging of socket errors, e.g. change

  DLMGCP ERROR Failed to read: 111/Connection refused (mgcp_client.c:720)

to

  DLMGCP ERROR Failed to read: r=10.0.99.2:2427<->l=10.0.99.2:2728: 
111='Connection refused' (mgcp_client.c:721)

but it is just not handy to compose logging with the current API:

- osmo_sock_get_name() requires a talloc_free().
- all the others require output buffers.
- the only way to conveniently compose a logging string and,
- notably, the only trivial way to skip the string composition if the logging
  level is currently muted, is to have a function that returns a static string:
  the new osmo_sock_get_name2().
- (I think the osmo_sock_get_{local,remote}_* convenience wrappers should never
  have been added, because they encourage the caller to invoke the same code
  twice, for IP addr and port, and throw away one half each time.)

Related: Iae728192f499330d16836d9435648f6b8ed213b6 (osmo-mgw)
Change-Id: I8ad89ac447c9c582742e70d082072bdd40a5a398
---
M include/osmocom/core/socket.h
M src/socket.c
2 files changed, 49 insertions(+), 17 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/68/12268/1

diff --git a/include/osmocom/core/socket.h b/include/osmocom/core/socket.h
index 79a61bb..fd28f21 100644
--- a/include/osmocom/core/socket.h
+++ b/include/osmocom/core/socket.h
@@ -60,6 +60,9 @@
const char *socket_path, unsigned int flags);

 char *osmo_sock_get_name(void *ctx, int fd);
+const char *osmo_sock_get_name2(int fd);
+int osmo_sock_get_name2_buf(char *str, size_t str_len, int fd);
+int osmo_sock_get_ip_and_port(int fd, char *ip, size_t ip_len, char *port, 
size_t port_len, bool local);
 int osmo_sock_get_local_ip(int fd, char *host, size_t len);
 int osmo_sock_get_local_ip_port(int fd, char *port, size_t len);
 int osmo_sock_get_remote_ip(int fd, char *host, size_t len);
diff --git a/src/socket.c b/src/socket.c
index e804ab5..25c5504 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -697,10 +697,7 @@
return osmo_fd_init_ofd(ofd, osmo_sock_unix_init(type, proto, 
socket_path, flags));
 }

-/*! Get the IP and/or port number on socket. This is for internal usage.
- *  Convenience wrappers: osmo_sock_get_local_ip(),
- *  osmo_sock_get_local_ip_port(), osmo_sock_get_remote_ip(),
- *  osmo_sock_get_remote_ip_port() and osmo_sock_get_name()
+/*! Get the IP and/or port number on socket in separate string buffers.
  *  \param[in] fd file descriptor of socket
  *  \param[out] ip IP address (will be filled in when not NULL)
  *  \param[in] ip_len length of the ip buffer
@@ -709,7 +706,7 @@
  *  \param[in] local (true) or remote (false) name will get looked at
  *  \returns 0 on success; negative otherwise
  */
-static int osmo_sock_get_name2(int fd, char *ip, size_t ip_len, char *port, 
size_t port_len, bool local)
+int osmo_sock_get_ip_and_port(int fd, char *ip, size_t ip_len, char *port, 
size_t port_len, bool local)
 {
struct sockaddr sa;
socklen_t len = sizeof(sa);
@@ -741,7 +738,7 @@
  */
 int osmo_sock_get_local_ip(int fd, char *ip, size_t len)
 {
-   return osmo_sock_get_name2(fd, ip, len, NULL, 0, true);
+   return osmo_sock_get_ip_and_port(fd, ip, len, NULL, 0, true);
 }

 /*! Get local port on socket
@@ -752,7 +749,7 @@
  */
 int osmo_sock_get_local_ip_port(int fd, char *port, size_t len)
 {
-   return osmo_sock_get_name2(fd, NULL, 0, port, len, true);
+   return osmo_sock_get_ip_and_port(fd, NULL, 0, port, len, true);
 }

 /*! Get remote IP address on 

Change in osmo-msc[master]: vty: show subscriber: put() before printing the use count

2018-12-11 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/12266


Change subject: vty: show subscriber: put() before printing the use count
..

vty: show subscriber: put() before printing the use count

Do not show the VTY command's own use count during 'show subscriber '.

When using 'show subscriber msisdn 2023', I was surprised to see a use count of
2 and suspected a use count leak. With 'show subscriber cache' however, the use
count is 1.

So I realized it is the vty command's own use count that makes it two, besides
the lu_complete=true one.

Change-Id: Id02b57b7ed299b010b9f8b9e809548eb1e6aa699
---
M src/libmsc/msc_vty.c
1 file changed, 4 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/66/12266/1

diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c
index 06e1139..9516752 100644
--- a/src/libmsc/msc_vty.c
+++ b/src/libmsc/msc_vty.c
@@ -826,10 +826,12 @@
return CMD_WARNING;
}

-   subscr_dump_full_vty(vty, vsub);
-
+   /* Do not taint the use count in the output. It will not become 
deallocated, since we are not multi-threaded,
+* and since it existed before we called _get() on it above. */
vlr_subscr_put(vsub);

+   subscr_dump_full_vty(vty, vsub);
+
return CMD_SUCCESS;
 }


--
To view, visit https://gerrit.osmocom.org/12266
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id02b57b7ed299b010b9f8b9e809548eb1e6aa699
Gerrit-Change-Number: 12266
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in osmo-msc[master]: log: by default start with all categories on LOGL_NOTICE

2018-12-11 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/12267


Change subject: log: by default start with all categories on LOGL_NOTICE
..

log: by default start with all categories on LOGL_NOTICE

They were on DEBUG during early development stages, and it's high time that I
drop those back to NOTICE.

Change-Id: I3b46e9107a7a1d81a44d2a2eb855c10960a1ab6b
---
M src/osmo-msc/msc_main.c
1 file changed, 4 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/67/12267/1

diff --git a/src/osmo-msc/msc_main.c b/src/osmo-msc/msc_main.c
index 8500b97..806632a 100644
--- a/src/osmo-msc/msc_main.c
+++ b/src/osmo-msc/msc_main.c
@@ -468,22 +468,22 @@
[DSMPP] = {
.name = "DSMPP",
.description = "SMPP interface for external SMS apps",
-   .enabled = 1, .loglevel = LOGL_DEBUG,
+   .enabled = 1, .loglevel = LOGL_NOTICE,
},
[DRANAP] = {
.name = "DRANAP",
.description = "Radio Access Network Application Part Protocol",
-   .enabled = 1, .loglevel = LOGL_DEBUG,
+   .enabled = 1, .loglevel = LOGL_NOTICE,
},
[DVLR] = {
.name = "DVLR",
.description = "Visitor Location Register",
-   .enabled = 1, .loglevel = LOGL_DEBUG,
+   .enabled = 1, .loglevel = LOGL_NOTICE,
},
[DIUCS] = {
.name = "DIUCS",
.description = "Iu-CS Protocol",
-   .enabled = 1, .loglevel = LOGL_DEBUG,
+   .enabled = 1, .loglevel = LOGL_NOTICE,
},
[DBSSAP] = {
.name = "DBSSAP",

--
To view, visit https://gerrit.osmocom.org/12267
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3b46e9107a7a1d81a44d2a2eb855c10960a1ab6b
Gerrit-Change-Number: 12267
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Jenkins build is back to normal : master-osmo-msc » --enable-iu,0,a3=default,a4=default,osmocom-master-debian9 #7409

2018-12-11 Thread jenkins
See 




Build failed in Jenkins: master-osmo-msc » --enable-iu,0,a3=default,a4=default,osmocom-master-debian9 #7408

2018-12-11 Thread jenkins
See 


--
[...truncated 24.06 KB...]
  CC   bits.lo
  CC   bitcomp.lo
  CC   counter.lo
  CC   fsm.lo
  CC   write_queue.lo
  CC   utils.lo
  CC   socket.lo
  CC   logging.lo
  CC   logging_syslog.lo
  CC   logging_gsmtap.lo
  CC   rate_ctr.lo
  CC   gsmtap_util.lo
  CC   crc16.lo
  CC   panic.lo
  CC   backtrace.lo
  CC   conv.lo
  CC   application.lo
  CC   rbtree.lo
  CC   strrb.lo
  CC   loggingrb.lo
  CC   crc8gen.lo
  CC   crc16gen.lo
  CC   crc32gen.lo
  CC   crc64gen.lo
  CC   macaddr.lo
  CC   stat_item.lo
  CC   stats.lo
  CC   stats_statsd.lo
  CC   prim.lo
  CC   conv_acc.lo
  CC   conv_acc_generic.lo
  CC   sercomm.lo
  CC   prbs.lo
  CC   isdnhdlc.lo
  CC   conv_acc_sse.lo
  CC   conv_acc_sse_avx.lo
  CC   plugin.lo
  CC   msgfile.lo
  CC   serial.lo
  CCLD libosmocore.la
make[4]: Entering directory '/build/deps/libosmocore/src'
make[4]: Nothing to be done for 'install-data-am'.
 /bin/mkdir -p '/build/deps/install/stow/libosmocore/lib'
 /bin/bash ../libtool   --mode=install /usr/bin/install -c   libosmocore.la 
'/build/deps/install/stow/libosmocore/lib'
libtool: install: /usr/bin/install -c .libs/libosmocore.so.11.0.0 
/build/deps/install/stow/libosmocore/lib/libosmocore.so.11.0.0
libtool: install: (cd /build/deps/install/stow/libosmocore/lib && { ln -s -f 
libosmocore.so.11.0.0 libosmocore.so.11 || { rm -f libosmocore.so.11 && ln -s 
libosmocore.so.11.0.0 libosmocore.so.11; }; })
libtool: install: (cd /build/deps/install/stow/libosmocore/lib && { ln -s -f 
libosmocore.so.11.0.0 libosmocore.so || { rm -f libosmocore.so && ln -s 
libosmocore.so.11.0.0 libosmocore.so; }; })
libtool: install: /usr/bin/install -c .libs/libosmocore.lai 
/build/deps/install/stow/libosmocore/lib/libosmocore.la
libtool: finish: 
PATH="/usr/local/bin:/usr/bin:/bin:/usr/games:/home/osmocom-build/bin:/build_bin:/sbin"
 ldconfig -n /build/deps/install/stow/libosmocore/lib
--
Libraries have been installed in:
   /build/deps/install/stow/libosmocore/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
 during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
 during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
--
make[4]: Leaving directory '/build/deps/libosmocore/src'
make[3]: Leaving directory '/build/deps/libosmocore/src'
make[2]: Leaving directory '/build/deps/libosmocore/src'
Making install in src/vty
make[2]: Entering directory '/build/deps/libosmocore/src/vty'
  CC   buffer.lo
  CC   command.lo
  CC   vty.lo
  CC   logging_vty.lo
  CC   telnet_interface.lo
  CC   vector.lo
  CC   stats_vty.lo
  CC   utils.lo
  CC   fsm_vty.lo
  CC   talloc_ctx_vty.lo
  CCLD libosmovty.la
make[3]: Entering directory '/build/deps/libosmocore/src/vty'
make[3]: Nothing to be done for 'install-data-am'.
 /bin/mkdir -p '/build/deps/install/stow/libosmocore/lib'
 /bin/bash ../../libtool   --mode=install /usr/bin/install -c   libosmovty.la 
'/build/deps/install/stow/libosmocore/lib'
libtool: install: warning: relinking `libosmovty.la'
libtool: install: (cd /build/deps/libosmocore/src/vty; /bin/bash 
/build/deps/libosmocore/libtool  --silent --tag CC --mode=relink gcc -Wall -g 
-O2 -DBUILDING_LIBOSMOCORE -Wall -version-info 5:0:1 -no-undefined -o 
libosmovty.la -rpath /build/deps/install/stow/libosmocore/lib buffer.lo 
command.lo vty.lo vector.lo utils.lo telnet_interface.lo logging_vty.lo 
stats_vty.lo fsm_vty.lo talloc_ctx_vty.lo ../../src/libosmocore.la -ltalloc )
libtool: install: /usr/bin/install -c .libs/libosmovty.so.4.1.0T 
/build/deps/install/stow/libosmocore/lib/libosmovty.so.4.1.0
libtool: install: (cd /build/deps/install/stow/libosmocore/lib && { ln -s -f 
libosmovty.so.4.1.0 libosmovty.so.4 || { rm -f libosmovty.so.4 && ln -s 
libosmovty.so.4.1.0 libosmovty.so.4; }; })
libtool: install: (cd /build/deps/install/stow/libosmocore/lib && { ln -s -f 
libosmovty.so.4.1.0 libosmovty.so || { rm -f libosmovty.so && ln -s 
libosmovty.so.4.1.0 libosmovty.so; }; })
libtool: install: /usr/bin/install -c 

Change in osmo-mgw[master]: check_rtp: on IP:port errors, log the IP and port

2018-12-11 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/12265


Change subject: check_rtp: on IP:port errors, log the IP and port
..

check_rtp: on IP:port errors, log the IP and port

Half of those are obviously zero, but I'd rather print the raw data instead of
adding string constants, even if the condition must always lead to 0.0.0.0:0.

Rationale: I had osmo-mgw listen on 0.0.0.0 and got the error message
  DRTP ERROR endpoint:0x1 destination IP-address is invalid
which didn't convey that 0.0.0.0 is regarded as invalid.

Change-Id: I9e98d464a27038904797c5c10735a98ef5b7b9c3
---
M src/libosmo-mgcp/mgcp_network.c
1 file changed, 6 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/65/12265/1

diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index de34cc6..7af8e71 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -945,22 +945,22 @@
 * and IP-address for outgoing data. */
if (strcmp(inet_ntoa(conn->end.addr), "0.0.0.0") == 0 && 
conn->end.rtp_port == 0) {
LOGP(DRTP, LOGL_DEBUG,
-"endpoint:0x%x destination IP-address and rtp port is (not 
yet) known\n",
-ENDPOINT_NUMBER(endp));
+"endpoint:0x%x destination IP-address and rtp port is (not 
yet) known (%s:%u)\n",
+ENDPOINT_NUMBER(endp), inet_ntoa(conn->end.addr), 
conn->end.rtp_port);
return -1;
}

if (strcmp(inet_ntoa(conn->end.addr), "0.0.0.0") == 0) {
LOGP(DRTP, LOGL_ERROR,
-"endpoint:0x%x destination IP-address is invalid\n",
-ENDPOINT_NUMBER(endp));
+"endpoint:0x%x destination IP-address is invalid 
(%s:%u)\n",
+ENDPOINT_NUMBER(endp), inet_ntoa(conn->end.addr), 
conn->end.rtp_port);
return -1;
}

if (conn->end.rtp_port == 0) {
LOGP(DRTP, LOGL_ERROR,
-"endpoint:0x%x destination rtp port is invalid\n",
-ENDPOINT_NUMBER(endp));
+"endpoint:0x%x destination rtp port is invalid (%s:%u)\n",
+ENDPOINT_NUMBER(endp), inet_ntoa(conn->end.addr), 
conn->end.rtp_port);
return -1;
}


--
To view, visit https://gerrit.osmocom.org/12265
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9e98d464a27038904797c5c10735a98ef5b7b9c3
Gerrit-Change-Number: 12265
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in osmo-bsc[master]: paging: Properly enclose logging imsi filter scope

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12251 )

Change subject: paging: Properly enclose logging imsi filter scope
..

paging: Properly enclose logging imsi filter scope

Otherwise all logging is kept enabled after passing through those code
paths.

Change-Id: I06a977d97e6ffea02ec7402d48410c0e7cc6c155
---
M src/osmo-bsc/paging.c
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/src/osmo-bsc/paging.c b/src/osmo-bsc/paging.c
index 03f940c..2c9d5cd 100644
--- a/src/osmo-bsc/paging.c
+++ b/src/osmo-bsc/paging.c
@@ -285,6 +285,8 @@

/* destroy it now. Do not access req afterwards */
paging_remove_request(>bts->paging, req);
+
+   log_set_context(LOG_CTX_BSC_SUBSCR, NULL);
 }

 #define GSM_FRAME_DURATION_us  4615
@@ -440,6 +442,7 @@
continue;
_paging_request_stop(bts, bsub, NULL, NULL);
}
+   log_set_context(LOG_CTX_BSC_SUBSCR, NULL);
 }



--
To view, visit https://gerrit.osmocom.org/12251
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I06a977d97e6ffea02ec7402d48410c0e7cc6c155
Gerrit-Change-Number: 12251
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-bsc[master]: VTY: Allow logging filter imsi statements for IMSIs we haven't seen yet

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12250 )

Change subject: VTY: Allow logging filter imsi statements for IMSIs we haven't 
seen yet
..

VTY: Allow logging filter imsi statements for IMSIs we haven't seen yet

Limiting the logging filter only to IMSIs that we have as local
subscriber doesn't make sense for osmo-bsc since all subscribers are
initially unknown.

Create a bsc subscriber and enable logging there. This struct will then
be used and liked to the gsm_subscr_conn when receiving the Location
update.

Related: OS#3641
Change-Id: Ia20bdc15565417020205d7b2b06b04a01c03106c
---
M src/osmo-bsc/osmo_bsc_vty.c
1 file changed, 8 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c
index a32f580..6e3d1c1 100644
--- a/src/osmo-bsc/osmo_bsc_vty.c
+++ b/src/osmo-bsc/osmo_bsc_vty.c
@@ -886,15 +886,21 @@
struct log_target *tgt = osmo_log_vty2tgt(vty);
const char *imsi = argv[0];

-   bsc_subscr = bsc_subscr_find_by_imsi(bsc_gsmnet->bsc_subscribers, imsi);
+   if (!tgt)
+   return CMD_WARNING;
+
+   bsc_subscr = 
bsc_subscr_find_or_create_by_imsi(bsc_gsmnet->bsc_subscribers, imsi);

if (!bsc_subscr) {
-   vty_out(vty, "%%no subscriber with IMSI(%s)%s",
+   vty_out(vty, "%%failed to enable logging for subscriber with 
IMSI(%s)%s",
imsi, VTY_NEWLINE);
return CMD_WARNING;
}

log_set_filter_bsc_subscr(tgt, bsc_subscr);
+   /* log_set_filter has grabbed its own reference  */
+   bsc_subscr_put(bsc_subscr);
+
return CMD_SUCCESS;
 }


--
To view, visit https://gerrit.osmocom.org/12250
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia20bdc15565417020205d7b2b06b04a01c03106c
Gerrit-Change-Number: 12250
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: daniel 


Change in osmo-bsc[master]: bsc: bssap: Set subscr log context during paging

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12256 )

Change subject: bsc: bssap: Set subscr log context during paging
..

bsc: bssap: Set subscr log context during paging

Change-Id: I3998a35ff6ea29440882514bbb30cafed66f03fa
---
M src/osmo-bsc/osmo_bsc_bssap.c
1 file changed, 8 insertions(+), 2 deletions(-)

Approvals:
  Pau Espin Pedrol: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index b5ff152..60ec5fb 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -96,11 +96,15 @@
struct bsc_subscr *subscr;
int ret;

+   subscr = 
bsc_subscr_find_or_create_by_imsi(msc->network->bsc_subscribers,
+  mi_string);
+
+   if (subscr)
+   log_set_context(LOG_CTX_BSC_SUBSCR, subscr);
+
LOGP(DMSC, LOGL_INFO, "Paging request from MSC BTS: %d IMSI: '%s' TMSI: 
'0x%x/%u' LAC: 0x%x\n",
bts->nr, mi_string, tmsi, tmsi, lac);

-   subscr = 
bsc_subscr_find_or_create_by_imsi(msc->network->bsc_subscribers,
-  mi_string);
if (!subscr) {
LOGP(DMSC, LOGL_ERROR, "Paging request failed: Could not 
allocate subscriber for %s\n", mi_string);
return;
@@ -116,6 +120,8 @@

/* the paging code has grabbed its own references */
bsc_subscr_put(subscr);
+
+   log_set_context(LOG_CTX_BSC_SUBSCR, NULL);
 }

 static void

--
To view, visit https://gerrit.osmocom.org/12256
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I3998a35ff6ea29440882514bbb30cafed66f03fa
Gerrit-Change-Number: 12256
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-CC: Harald Welte 


Change in osmo-bsc[master]: bsc: rsl: Set subscr log context during meas report

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12254 )

Change subject: bsc: rsl: Set subscr log context during meas report
..

bsc: rsl: Set subscr log context during meas report

Change-Id: Idc6af592e870d15491797ae6fcaffaac2b411766
---
M src/osmo-bsc/abis_rsl.c
1 file changed, 9 insertions(+), 3 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index 954fb0f..8ffb07e 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -917,11 +917,14 @@
 {
int i;
const char *name = "";
+   struct bsc_subscr *bsub = NULL;

if (lchan && lchan->conn) {
-   if (lchan->conn->bsub)
-   name = bsc_subscr_name(lchan->conn->bsub);
-   else
+   bsub = lchan->conn->bsub;
+   if (bsub) {
+   log_set_context(LOG_CTX_BSC_SUBSCR, bsub);
+   name = bsc_subscr_name(bsub);
+   } else
name = lchan->name;
}

@@ -960,6 +963,9 @@
DEBUGP(DMEAS, "IDX=%u ARFCN=%u BSIC=%u => %d dBm\n",
mrc->neigh_idx, mrc->arfcn, mrc->bsic, 
rxlev2dbm(mrc->rxlev));
}
+
+   if (bsub)
+   log_set_context(LOG_CTX_BSC_SUBSCR, NULL);
 }

 static struct gsm_meas_rep *lchan_next_meas_rep(struct gsm_lchan *lchan)

--
To view, visit https://gerrit.osmocom.org/12254
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Idc6af592e870d15491797ae6fcaffaac2b411766
Gerrit-Change-Number: 12254
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-bsc[master]: bsc: Set subscr log context during complete_layer3

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12253 )

Change subject: bsc: Set subscr log context during complete_layer3
..

bsc: Set subscr log context during complete_layer3

Change-Id: I162a474f711248a3f64a0438967fa6f8a9a3e686
---
M src/osmo-bsc/gsm_08_08.c
1 file changed, 16 insertions(+), 10 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/src/osmo-bsc/gsm_08_08.c b/src/osmo-bsc/gsm_08_08.c
index a3e8b30..c3c5000 100644
--- a/src/osmo-bsc/gsm_08_08.c
+++ b/src/osmo-bsc/gsm_08_08.c
@@ -433,12 +433,14 @@
enum bsc_con ret;
struct gsm0808_speech_codec_list scl;

+   log_set_context(LOG_CTX_BSC_SUBSCR, conn->bsub);
+
/* Check the filter */
rc = bsc_filter_initial(msc->network->bsc_data, msc, conn, msg,
, _type, _cause);
if (rc < 0) {
bsc_maybe_lu_reject(conn, con_type, lu_cause);
-   return false;
+   goto early_fail;
}

/* allocate resource for a new connection */
@@ -450,8 +452,7 @@
bsc_send_ussd_no_srv(conn, msg, msc->ussd_msc_lost_txt);
else if (ret == BSC_CON_REJECT_RF_GRACE)
bsc_send_ussd_no_srv(conn, msg, msc->ussd_grace_txt);
-
-   return false;
+   goto early_fail;
}

/* TODO: also extract TMSI. We get an IMSI only when an initial L3 
Complete comes in that
@@ -460,15 +461,18 @@
if (imsi) {
conn->filter_state.imsi = talloc_steal(conn, imsi);
if (conn->bsub) {
+   log_set_context(LOG_CTX_BSC_SUBSCR, conn->bsub);
/* Already a subscriber on L3 Complete? Should never 
happen... */
if (conn->bsub->imsi[0]
&& strcmp(conn->bsub->imsi, imsi))
LOGP(DMSC, LOGL_ERROR, "Subscriber's IMSI 
changes from %s to %s\n",
 conn->bsub->imsi, imsi);
bsc_subscr_set_imsi(conn->bsub, imsi);
-   } else
+   } else {
conn->bsub = 
bsc_subscr_find_or_create_by_imsi(msc->network->bsc_subscribers,
   imsi);
+   log_set_context(LOG_CTX_BSC_SUBSCR, conn->bsub);
+   }
gscon_update_id(conn);
}
conn->filter_state.con_type = con_type;
@@ -493,14 +497,16 @@
} else
resp = gsm0808_create_layer3_2(msg, cgi_for_msc(conn->sccp.msc, 
conn_get_bts(conn)), NULL);

-   if (!resp) {
+   if (resp)
+   osmo_fsm_inst_dispatch(conn->fi, GSCON_EV_A_CONN_REQ, resp);
+   else
LOGP(DMSC, LOGL_DEBUG, "Failed to create layer3 message.\n");
-   return false;
-   }

-   osmo_fsm_inst_dispatch(conn->fi, GSCON_EV_A_CONN_REQ, resp);
-
-   return true;
+   log_set_context(LOG_CTX_BSC_SUBSCR, NULL);
+   return !!resp;
+early_fail:
+   log_set_context(LOG_CTX_BSC_SUBSCR, NULL);
+   return false;
 }

 /*

--
To view, visit https://gerrit.osmocom.org/12253
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I162a474f711248a3f64a0438967fa6f8a9a3e686
Gerrit-Change-Number: 12253
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-bsc[master]: bsc_main: filter_fn: Compare imsi values instead of subscr pointers

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12252 )

Change subject: bsc_main: filter_fn: Compare imsi values instead of subscr 
pointers
..

bsc_main: filter_fn: Compare imsi values instead of subscr pointers

Since we actually want to match by IMSI as specified by filter in VTY.
It will allow to match based on other information later.

Change-Id: Ia73fd2f38e42396db8f6d2cc6b2c163aa8f67f3f
---
M src/osmo-bsc/osmo_bsc_main.c
1 file changed, 5 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c
index 67fccd3..08bb40d 100644
--- a/src/osmo-bsc/osmo_bsc_main.c
+++ b/src/osmo-bsc/osmo_bsc_main.c
@@ -35,6 +35,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 

@@ -767,10 +768,12 @@

 static int filter_fn(const struct log_context *ctx, struct log_target *tar)
 {
-   const struct bsc_subscr *bsub = ctx->ctx[LOG_CTX_BSC_SUBSCR];
+   const struct bsc_subscr *bsub_ctx = ctx->ctx[LOG_CTX_BSC_SUBSCR];
+   const struct bsc_subscr *bsub_filter = 
tar->filter_data[LOG_FLT_BSC_SUBSCR];

if ((tar->filter_map & (1 << LOG_FLT_BSC_SUBSCR)) != 0
-   && bsub && bsub == tar->filter_data[LOG_FLT_BSC_SUBSCR])
+   && bsub_ctx && bsub_filter
+   && strncmp(bsub_ctx->imsi, bsub_filter->imsi, 
sizeof(bsub_ctx->imsi)) == 0)
return 1;

return 0;

--
To view, visit https://gerrit.osmocom.org/12252
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia73fd2f38e42396db8f6d2cc6b2c163aa8f67f3f
Gerrit-Change-Number: 12252
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-bsc[master]: bsc: dtap: Set subscr log context

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12255 )

Change subject: bsc: dtap: Set subscr log context
..

bsc: dtap: Set subscr log context

Change-Id: I362a7d10f5ca9a95b594f7caafd7ed5b10fd059a
---
M src/osmo-bsc/gsm_08_08.c
M src/osmo-bsc/osmo_bsc_bssap.c
2 files changed, 11 insertions(+), 3 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/src/osmo-bsc/gsm_08_08.c b/src/osmo-bsc/gsm_08_08.c
index c3c5000..2c6a689 100644
--- a/src/osmo-bsc/gsm_08_08.c
+++ b/src/osmo-bsc/gsm_08_08.c
@@ -602,8 +602,10 @@
 {
int lu_cause;

+   log_set_context(LOG_CTX_BSC_SUBSCR, conn->bsub);
+
if (!msc_connected(conn))
-   return;
+   goto done;

LOGP(DMSC, LOGL_INFO, "Tx MSC DTAP LINK_ID=0x%02x\n", link_id);

@@ -612,7 +614,7 @@
 * to handle it. If it was handled we will return.
 */
if (handle_cc_setup(conn, msg) >= 1)
-   return;
+   goto done;

/* Check the filter */
if (bsc_filter_data(conn, msg, _cause) < 0) {
@@ -620,7 +622,7 @@
conn->filter_state.con_type,
lu_cause);
bsc_clear_request(conn, 0);
-   return;
+   goto done;
}

bsc_scan_bts_msg(conn, msg);
@@ -628,6 +630,9 @@
/* Store link_id in msg->cb */
OBSC_LINKID_CB(msg) = link_id;
osmo_fsm_inst_dispatch(conn->fi, GSCON_EV_MO_DTAP, msg);
+done:
+   log_set_context(LOG_CTX_BSC_SUBSCR, NULL);
+   return;
 }

 /*! BSC->MSC: RR conn has been cleared. */
diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index 39425f6..b5ff152 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -980,6 +980,8 @@
 int bsc_handle_dt(struct gsm_subscriber_connection *conn,
  struct msgb *msg, unsigned int len)
 {
+   log_set_context(LOG_CTX_BSC_SUBSCR, conn->bsub);
+
if (len < sizeof(struct bssmap_header)) {
LOGP(DMSC, LOGL_ERROR, "The header is too short.\n");
}
@@ -997,6 +999,7 @@
gsm0808_bssap_name(msg->l3h[0]));
}

+   log_set_context(LOG_CTX_BSC_SUBSCR, NULL);
return -1;
 }


--
To view, visit https://gerrit.osmocom.org/12255
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I362a7d10f5ca9a95b594f7caafd7ed5b10fd059a
Gerrit-Change-Number: 12255
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-bsc[master]: paging: fix whitespace

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12249 )

Change subject: paging: fix whitespace
..

paging: fix whitespace

Change-Id: I81c4a9f0dbd708df27a485ef764c9524a36d548a
---
M src/osmo-bsc/paging.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/src/osmo-bsc/paging.c b/src/osmo-bsc/paging.c
index 246114f..03f940c 100644
--- a/src/osmo-bsc/paging.c
+++ b/src/osmo-bsc/paging.c
@@ -267,7 +267,7 @@
return 1;
}

-   return 0;
+   return 0;
 }
 
 /*! Call-back once T3113 (paging timeout) expires for given paging_request */

--
To view, visit https://gerrit.osmocom.org/12249
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I81c4a9f0dbd708df27a485ef764c9524a36d548a
Gerrit-Change-Number: 12249
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-bsc[master]: bsc: bssap: Set subscr log context during paging

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12256 )

Change subject: bsc: bssap: Set subscr log context during paging
..


Patch Set 2: Code-Review+2

Adding +2 myself since I fixed the cosmetic issue.


--
To view, visit https://gerrit.osmocom.org/12256
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3998a35ff6ea29440882514bbb30cafed66f03fa
Gerrit-Change-Number: 12256
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Wed, 12 Dec 2018 00:00:47 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: bsc: bssap: Set subscr log context during paging

2018-12-11 Thread Pau Espin Pedrol
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/12256

to look at the new patch set (#2).

Change subject: bsc: bssap: Set subscr log context during paging
..

bsc: bssap: Set subscr log context during paging

Change-Id: I3998a35ff6ea29440882514bbb30cafed66f03fa
---
M src/osmo-bsc/osmo_bsc_bssap.c
1 file changed, 8 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/56/12256/2
--
To view, visit https://gerrit.osmocom.org/12256
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I3998a35ff6ea29440882514bbb30cafed66f03fa
Gerrit-Change-Number: 12256
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Harald Welte 


Change in osmo-bsc[master]: bsc: bssap: Set subscr log context during paging

2018-12-11 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/12256 )

Change subject: bsc: bssap: Set subscr log context during paging
..


Patch Set 1:

(1 comment)

cosmetic issue, otherwise fine with me.

https://gerrit.osmocom.org/#/c/12256/1/src/osmo-bsc/osmo_bsc_bssap.c
File src/osmo-bsc/osmo_bsc_bssap.c:

https://gerrit.osmocom.org/#/c/12256/1/src/osmo-bsc/osmo_bsc_bssap.c@102
PS1, Line 102:  if(subscr)
if only if() was a function and not a statement...



--
To view, visit https://gerrit.osmocom.org/12256
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3998a35ff6ea29440882514bbb30cafed66f03fa
Gerrit-Change-Number: 12256
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Tue, 11 Dec 2018 21:13:16 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-bsc[master]: bsc: dtap: Set subscr log context

2018-12-11 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/12255 )

Change subject: bsc: dtap: Set subscr log context
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/12255
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I362a7d10f5ca9a95b594f7caafd7ed5b10fd059a
Gerrit-Change-Number: 12255
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Tue, 11 Dec 2018 21:12:24 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: bsc_main: filter_fn: Compare imsi values instead of subscr pointers

2018-12-11 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/12252 )

Change subject: bsc_main: filter_fn: Compare imsi values instead of subscr 
pointers
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/12252
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia73fd2f38e42396db8f6d2cc6b2c163aa8f67f3f
Gerrit-Change-Number: 12252
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Tue, 11 Dec 2018 21:11:35 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: bsc: rsl: Set subscr log context during meas report

2018-12-11 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/12254 )

Change subject: bsc: rsl: Set subscr log context during meas report
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/12254
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc6af592e870d15491797ae6fcaffaac2b411766
Gerrit-Change-Number: 12254
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Tue, 11 Dec 2018 21:11:53 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: VTY: Allow logging filter imsi statements for IMSIs we haven't seen yet

2018-12-11 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/12250 )

Change subject: VTY: Allow logging filter imsi statements for IMSIs we haven't 
seen yet
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/12250
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia20bdc15565417020205d7b2b06b04a01c03106c
Gerrit-Change-Number: 12250
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: daniel 
Gerrit-Comment-Date: Tue, 11 Dec 2018 21:10:35 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: paging: Properly enclose logging imsi filter scope

2018-12-11 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/12251 )

Change subject: paging: Properly enclose logging imsi filter scope
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/12251
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I06a977d97e6ffea02ec7402d48410c0e7cc6c155
Gerrit-Change-Number: 12251
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Tue, 11 Dec 2018 21:10:59 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: bsc: Set subscr log context during complete_layer3

2018-12-11 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/12253 )

Change subject: bsc: Set subscr log context during complete_layer3
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/12253
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I162a474f711248a3f64a0438967fa6f8a9a3e686
Gerrit-Change-Number: 12253
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Tue, 11 Dec 2018 21:09:33 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: paging: fix whitespace

2018-12-11 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/12249 )

Change subject: paging: fix whitespace
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/12249
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I81c4a9f0dbd708df27a485ef764c9524a36d548a
Gerrit-Change-Number: 12249
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Tue, 11 Dec 2018 21:09:47 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: MGCP: remove commented variants

2018-12-11 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12238 )

Change subject: MGCP: remove commented variants
..

MGCP: remove commented variants

It's unclear why those variants were commented - looks like artifact
from initial development. Let's drop them to avoid confusion.

Change-Id: I3f11a93634fc50243a7210edcd501bd4b90d6dcd
---
M library/MGCP_Types.ttcn
1 file changed, 0 insertions(+), 3 deletions(-)

Approvals:
  Pau Espin Pedrol: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/library/MGCP_Types.ttcn b/library/MGCP_Types.ttcn
index 6bb266e..8e11c7a 100644
--- a/library/MGCP_Types.ttcn
+++ b/library/MGCP_Types.ttcn
@@ -53,7 +53,6 @@
MgcpVersion ver
} with {
variant "SEPARATOR(' ', '[\t ]+')"
-   //variant "END('\r\n', '(\n)|(\r\n)')"
variant "END('\r\n', '([\r\n])|(\r\n)')"
}

@@ -63,7 +62,6 @@
} with {
variant "BEGIN('')"
variant "SEPARATOR(': ', ':[\t ]+')"
-   //variant "END('\r\n', '(\n)|(\r\n)')"
variant "END('\r\n', '([\r\n])|(\r\n)')"
}

@@ -91,7 +89,6 @@
charstring  string optional
} with {
variant "SEPARATOR(' ', '[\t ]+')"
-   //variant "END('\r\n', '(\n)|(\r\n)')"
variant "END('\r\n', '([\r\n])|(\r\n)')"
}


--
To view, visit https://gerrit.osmocom.org/12238
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I3f11a93634fc50243a7210edcd501bd4b90d6dcd
Gerrit-Change-Number: 12238
Gerrit-PatchSet: 3
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: dexter 


Change in docker-playground[master]: osmo-msc: set bind ip for SGs-interface

2018-12-11 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/12248 )

Change subject: osmo-msc: set bind ip for SGs-interface
..


Patch Set 1: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/#/c/12248/1//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/#/c/12248/1//COMMIT_MSG@9
PS1, Line 9: By default the SGs interface binds on 127.0.0.1
I think that's not a good default and it should be changed in osmo-msc.



--
To view, visit https://gerrit.osmocom.org/12248
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Icf2c36d253ce13a61fb98b4afd1739e1c321bb4b
Gerrit-Change-Number: 12248
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Tue, 11 Dec 2018 20:21:05 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-msc[master]: fix regression: mgcp FSM: accept Assignment Complete early

2018-12-11 Thread Neels Hofmeyr
Neels Hofmeyr has abandoned this change. ( https://gerrit.osmocom.org/12257 )

Change subject: fix regression: mgcp FSM: accept Assignment Complete early
..


Abandoned

reverted original patch instead
--
To view, visit https://gerrit.osmocom.org/12257
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: Ic0abdc51b82b0e924b2561582310a83528fd1880
Gerrit-Change-Number: 12257
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-msc[master]: jenkins: always enable -Werror

2018-12-11 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/12263


Change subject: jenkins: always enable -Werror
..

jenkins: always enable -Werror

Change-Id: If7cf70641114482b42b36489ec8562e5c069825b
---
M contrib/jenkins.sh
1 file changed, 2 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/63/12263/1

diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index be8dadc..a2d0720 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -39,13 +39,10 @@
 osmo-build-dep.sh osmo-mgw
 osmo-build-dep.sh osmo-hlr

-enable_werror=""
 if [ "x$IU" = "x--enable-iu" ]; then
osmo-build-dep.sh libasn1c
#osmo-build-dep.sh asn1c aper-prefix # only needed for make regen in 
osmo-iuh
osmo-build-dep.sh osmo-iuh
-else
-   enable_werror="--enable-werror"
 fi

 # Additional configure options and depends
@@ -65,12 +62,12 @@

 cd "$base"
 autoreconf --install --force
-./configure --enable-sanitize $enable_werror --enable-smpp $IU 
--enable-external-tests $CONFIG
+./configure --enable-sanitize --enable-werror --enable-smpp $IU 
--enable-external-tests $CONFIG
 $MAKE $PARALLEL_MAKE
 LD_LIBRARY_PATH="$inst/lib" $MAKE check \
   || cat-testlogs.sh
 LD_LIBRARY_PATH="$inst/lib" \
-  DISTCHECK_CONFIGURE_FLAGS="$enable_werror --enable-smpp $IU 
--enable-external-tests $CONFIG" \
+  DISTCHECK_CONFIGURE_FLAGS="--enable-werror --enable-smpp $IU 
--enable-external-tests $CONFIG" \
   $MAKE distcheck \
   || cat-testlogs.sh


--
To view, visit https://gerrit.osmocom.org/12263
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If7cf70641114482b42b36489ec8562e5c069825b
Gerrit-Change-Number: 12263
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in osmo-msc[master]: move ASS-COMPL MGCP handling out of a_iface_bssap.c

2018-12-11 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/12201 )

Change subject: move ASS-COMPL MGCP handling out of a_iface_bssap.c
..


Patch Set 3:

(1 comment)

This patch was reverted in 85cb2538f4cb4c6759824dae546564562ff3888e

https://gerrit.osmocom.org/#/c/12201/3/include/osmocom/msc/msc_mgcp.h
File include/osmocom/msc/msc_mgcp.h:

https://gerrit.osmocom.org/#/c/12201/3/include/osmocom/msc/msc_mgcp.h@27
PS3, Line 27: struct gsm0808_speech_codec;
> Yes, seems like osmocom/msc/ran_conn.h and osmocom/gsm/protocol/gsm_08_08. […]
it's better to just declare opaque structs where you can, to not pull in all 
sorts of dependencies "by accident"



--
To view, visit https://gerrit.osmocom.org/12201
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8137215c443239bddf3e69b5715839a365b73b6c
Gerrit-Change-Number: 12201
Gerrit-PatchSet: 3
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Tue, 11 Dec 2018 19:36:12 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmocom-bb[master]: trx_toolkit/data_if.py: add message parsing methods

2018-12-11 Thread Vadim Yanitskiy
Vadim Yanitskiy has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12261 )

Change subject: trx_toolkit/data_if.py: add message parsing methods
..

trx_toolkit/data_if.py: add message parsing methods

This change extends DATAInterface class with new methods:

  - recv_raw_data() - read raw data from socket;
  - recv_l12trx_msg() - read raw data and parse as L12TRX;
  - recv_trx2l1_msg() - read raw data and parse as TRX2L1;

which would simplify the further usage of this class.

Change-Id: I761c4e63864622d3882b8f9c80ea43b58f092cb1
---
M src/target/trx_toolkit/data_if.py
1 file changed, 33 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Pau Espin Pedrol: Looks good to me, approved



diff --git a/src/target/trx_toolkit/data_if.py 
b/src/target/trx_toolkit/data_if.py
index f4431a4..45114ed 100644
--- a/src/target/trx_toolkit/data_if.py
+++ b/src/target/trx_toolkit/data_if.py
@@ -26,6 +26,39 @@
 from data_msg import *

 class DATAInterface(UDPLink):
+   def recv_raw_data(self):
+   data, _ = self.sock.recvfrom(512)
+   return data
+
+   def recv_l12trx_msg(self):
+   # Read raw data from socket
+   data = self.recv_raw_data()
+
+   # Attempt to parse as a L12TRX message
+   try:
+   msg = DATAMSG_L12TRX()
+   msg.parse_msg(bytearray(data))
+   except:
+   log.error("Failed to parse a L12TRX message "
+   "from R:%s:%u" % (self.remote_addr, 
self.remote_port))
+   return None
+
+   return msg
+
+   def recv_trx2l1_msg(self):
+   # Read raw data from socket
+   data = self.recv_raw_data()
+
+   # Attempt to parse as a L12TRX message
+   try:
+   msg = DATAMSG_TRX2L1()
+   msg.parse_msg(bytearray(data))
+   except:
+   log.error("Failed to parse a TRX2L1 message "
+   "from R:%s:%u" % (self.remote_addr, 
self.remote_port))
+   return None
+
+   return msg

def send_msg(self, msg):
# Validate a message

--
To view, visit https://gerrit.osmocom.org/12261
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I761c4e63864622d3882b8f9c80ea43b58f092cb1
Gerrit-Change-Number: 12261
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmocom-bb[master]: trx_toolkit/ctrl_if_bb.py: fix SETTA command handling

2018-12-11 Thread Vadim Yanitskiy
Vadim Yanitskiy has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12258 )

Change subject: trx_toolkit/ctrl_if_bb.py: fix SETTA command handling
..

trx_toolkit/ctrl_if_bb.py: fix SETTA command handling

Since I8fd2a2ab7784b38bde5ebcfd0359b7e2cb53f5a7, SETTA command
handling was broken, because the range limitation was removed
together with argument parsing. Let's fix this.

Change-Id: If582af3849359866de129504cc5b2dc6d64edbd5
---
M src/target/trx_toolkit/ctrl_if_bb.py
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  Pau Espin Pedrol: Looks good to me, approved



diff --git a/src/target/trx_toolkit/ctrl_if_bb.py 
b/src/target/trx_toolkit/ctrl_if_bb.py
index aaa12f1..785636b 100644
--- a/src/target/trx_toolkit/ctrl_if_bb.py
+++ b/src/target/trx_toolkit/ctrl_if_bb.py
@@ -134,7 +134,7 @@
log.debug("Recv SETTA cmd")

# Save to the BurstForwarder instance
-   self.burst_fwd.ta = ta
+   self.burst_fwd.ta = int(request[1])
return 0

# Timing of Arrival simulation for Uplink

--
To view, visit https://gerrit.osmocom.org/12258
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If582af3849359866de129504cc5b2dc6d64edbd5
Gerrit-Change-Number: 12258
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmocom-bb[master]: trx_toolkit/ctrl_if_*.py: transparently pass UDPLink arguments

2018-12-11 Thread Vadim Yanitskiy
Vadim Yanitskiy has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12259 )

Change subject: trx_toolkit/ctrl_if_*.py: transparently pass UDPLink arguments
..

trx_toolkit/ctrl_if_*.py: transparently pass UDPLink arguments

There is no need to (re)define the arguments of UDPLink's constructor.
Let's use non-keyworded variable length argument list (*args).

Change-Id: Ia312a5e15ce88d5f7e8d76c4ea8c93c59d91be5a
---
M src/target/trx_toolkit/ctrl_if_bb.py
M src/target/trx_toolkit/ctrl_if_bts.py
2 files changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Pau Espin Pedrol: Looks good to me, approved



diff --git a/src/target/trx_toolkit/ctrl_if_bb.py 
b/src/target/trx_toolkit/ctrl_if_bb.py
index 785636b..fe7f3e8 100644
--- a/src/target/trx_toolkit/ctrl_if_bb.py
+++ b/src/target/trx_toolkit/ctrl_if_bb.py
@@ -34,8 +34,8 @@
tx_freq = None
pm = None

-   def __init__(self, remote_addr, remote_port, bind_addr, bind_port):
-   CTRLInterface.__init__(self, remote_addr, remote_port, 
bind_addr, bind_port)
+   def __init__(self, *udp_link_args):
+   CTRLInterface.__init__(self, *udp_link_args)
log.info("Init CTRL interface for BB (%s)" % self.desc_link())

def parse_cmd(self, request):
diff --git a/src/target/trx_toolkit/ctrl_if_bts.py 
b/src/target/trx_toolkit/ctrl_if_bts.py
index 2dde3e3..cb38b67 100644
--- a/src/target/trx_toolkit/ctrl_if_bts.py
+++ b/src/target/trx_toolkit/ctrl_if_bts.py
@@ -35,8 +35,8 @@
tx_freq = None
pm = None

-   def __init__(self, remote_addr, remote_port, bind_addr, bind_port):
-   CTRLInterface.__init__(self, remote_addr, remote_port, 
bind_addr, bind_port)
+   def __init__(self, *udp_link_args):
+   CTRLInterface.__init__(self, *udp_link_args)
log.info("Init CTRL interface for BTS (%s)" % self.desc_link())

def parse_cmd(self, request):

--
To view, visit https://gerrit.osmocom.org/12259
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia312a5e15ce88d5f7e8d76c4ea8c93c59d91be5a
Gerrit-Change-Number: 12259
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmocom-bb[master]: trx_toolkit/ctrl_if.py: read data from socket in handle_rx()

2018-12-11 Thread Vadim Yanitskiy
Vadim Yanitskiy has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12260 )

Change subject: trx_toolkit/ctrl_if.py: read data from socket in handle_rx()
..

trx_toolkit/ctrl_if.py: read data from socket in handle_rx()

It makes much more sense to read data from socket in handle_rx(),
instead of expecting a buffer with received data from caller.

Change-Id: I83479c60c54e36a2a7582714a6043090585957ae
---
M src/target/trx_toolkit/ctrl_if.py
M src/target/trx_toolkit/fake_trx.py
2 files changed, 7 insertions(+), 5 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Pau Espin Pedrol: Looks good to me, approved



diff --git a/src/target/trx_toolkit/ctrl_if.py 
b/src/target/trx_toolkit/ctrl_if.py
index b533746..45bfa2b 100644
--- a/src/target/trx_toolkit/ctrl_if.py
+++ b/src/target/trx_toolkit/ctrl_if.py
@@ -27,7 +27,11 @@
 from udp_link import UDPLink

 class CTRLInterface(UDPLink):
-   def handle_rx(self, data, remote):
+   def handle_rx(self):
+   # Read data from socket
+   data, remote = self.sock.recvfrom(128)
+   data = data.decode()
+
if not self.verify_req(data):
log.error("Wrong data on CTRL interface")
return
diff --git a/src/target/trx_toolkit/fake_trx.py 
b/src/target/trx_toolkit/fake_trx.py
index d73b566..95261df 100755
--- a/src/target/trx_toolkit/fake_trx.py
+++ b/src/target/trx_toolkit/fake_trx.py
@@ -112,13 +112,11 @@

# CTRL commands from BTS
if self.bts_ctrl.sock in r_event:
-   data, addr = self.bts_ctrl.sock.recvfrom(128)
-   self.bts_ctrl.handle_rx(data.decode(), addr)
+   self.bts_ctrl.handle_rx()

# CTRL commands from BB
if self.bb_ctrl.sock in r_event:
-   data, addr = self.bb_ctrl.sock.recvfrom(128)
-   self.bb_ctrl.handle_rx(data.decode(), addr)
+   self.bb_ctrl.handle_rx()

def shutdown(self):
log.info("Shutting down...")

--
To view, visit https://gerrit.osmocom.org/12260
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I83479c60c54e36a2a7582714a6043090585957ae
Gerrit-Change-Number: 12260
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmocom-bb[master]: trx_toolkit/data_if.py: add optional legacy message coding flag

2018-12-11 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/12262 )

Change subject: trx_toolkit/data_if.py: add optional legacy message coding flag
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/12262/1/src/target/trx_toolkit/data_if.py
File src/target/trx_toolkit/data_if.py:

https://gerrit.osmocom.org/#/c/12262/1/src/target/trx_toolkit/data_if.py@69
PS1, Line 69:   payload = msg.gen_msg()
> Wouldn't make more sense to pass this to gen_msg and already receive a 
> payload generated as expected […]
Oh, great idea! Thanks!



--
To view, visit https://gerrit.osmocom.org/12262
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6b9a8b611ea1e9badc4d9ddf13aa9e237028e39a
Gerrit-Change-Number: 12262
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Tue, 11 Dec 2018 18:20:12 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmocom-bb[master]: trx_toolkit/ctrl_if_*.py: transparently pass UDPLink arguments

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12259 )

Change subject: trx_toolkit/ctrl_if_*.py: transparently pass UDPLink arguments
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/12259
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia312a5e15ce88d5f7e8d76c4ea8c93c59d91be5a
Gerrit-Change-Number: 12259
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Tue, 11 Dec 2018 18:19:14 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmocom-bb[master]: trx_toolkit/data_if.py: add optional legacy message coding flag

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12262 )

Change subject: trx_toolkit/data_if.py: add optional legacy message coding flag
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/12262/1/src/target/trx_toolkit/data_if.py
File src/target/trx_toolkit/data_if.py:

https://gerrit.osmocom.org/#/c/12262/1/src/target/trx_toolkit/data_if.py@69
PS1, Line 69:   payload = msg.gen_msg()
Wouldn't make more sense to pass this to gen_msg and already receive a payload 
generated as expected? If gen_msg() is reused by several implementations, maybe 
adding a msg.set_legacy() API.



--
To view, visit https://gerrit.osmocom.org/12262
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6b9a8b611ea1e9badc4d9ddf13aa9e237028e39a
Gerrit-Change-Number: 12262
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Tue, 11 Dec 2018 18:18:54 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmocom-bb[master]: trx_toolkit/ctrl_if_*.py: transparently pass UDPLink arguments

2018-12-11 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/12259 )

Change subject: trx_toolkit/ctrl_if_*.py: transparently pass UDPLink arguments
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/12259/1/src/target/trx_toolkit/ctrl_if_bb.py
File src/target/trx_toolkit/ctrl_if_bb.py:

https://gerrit.osmocom.org/#/c/12259/1/src/target/trx_toolkit/ctrl_if_bb.py@37
PS1, Line 37:   def __init__(self, *udp_link_args):
> what about calling it superclass_args or ctrliface_args?
CTRLInterface has no additional arguments, so actually
we only deal with UDPLink arguments. This looks cleaner.



--
To view, visit https://gerrit.osmocom.org/12259
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia312a5e15ce88d5f7e8d76c4ea8c93c59d91be5a
Gerrit-Change-Number: 12259
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Tue, 11 Dec 2018 18:18:09 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmocom-bb[master]: trx_toolkit/data_if.py: add message parsing methods

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12261 )

Change subject: trx_toolkit/data_if.py: add message parsing methods
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/12261
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I761c4e63864622d3882b8f9c80ea43b58f092cb1
Gerrit-Change-Number: 12261
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Tue, 11 Dec 2018 18:17:11 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmocom-bb[master]: trx_toolkit/ctrl_if.py: read data from socket in handle_rx()

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12260 )

Change subject: trx_toolkit/ctrl_if.py: read data from socket in handle_rx()
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/12260
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I83479c60c54e36a2a7582714a6043090585957ae
Gerrit-Change-Number: 12260
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Tue, 11 Dec 2018 18:15:23 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmocom-bb[master]: trx_toolkit/ctrl_if_*.py: transparently pass UDPLink arguments

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12259 )

Change subject: trx_toolkit/ctrl_if_*.py: transparently pass UDPLink arguments
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/12259
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia312a5e15ce88d5f7e8d76c4ea8c93c59d91be5a
Gerrit-Change-Number: 12259
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Tue, 11 Dec 2018 18:15:27 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmocom-bb[master]: trx_toolkit/ctrl_if_*.py: transparently pass UDPLink arguments

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12259 )

Change subject: trx_toolkit/ctrl_if_*.py: transparently pass UDPLink arguments
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/12259/1/src/target/trx_toolkit/ctrl_if_bb.py
File src/target/trx_toolkit/ctrl_if_bb.py:

https://gerrit.osmocom.org/#/c/12259/1/src/target/trx_toolkit/ctrl_if_bb.py@37
PS1, Line 37:   def __init__(self, *udp_link_args):
what about calling it superclass_args or ctrliface_args?



--
To view, visit https://gerrit.osmocom.org/12259
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia312a5e15ce88d5f7e8d76c4ea8c93c59d91be5a
Gerrit-Change-Number: 12259
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Tue, 11 Dec 2018 18:14:26 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmocom-bb[master]: trx_toolkit/ctrl_if_bb.py: fix SETTA command handling

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12258 )

Change subject: trx_toolkit/ctrl_if_bb.py: fix SETTA command handling
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/12258
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If582af3849359866de129504cc5b2dc6d64edbd5
Gerrit-Change-Number: 12258
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Tue, 11 Dec 2018 18:13:19 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmocom-bb[master]: trx_toolkit/data_if.py: add message parsing methods

2018-12-11 Thread Vadim Yanitskiy
Vadim Yanitskiy has uploaded this change for review. ( 
https://gerrit.osmocom.org/12261


Change subject: trx_toolkit/data_if.py: add message parsing methods
..

trx_toolkit/data_if.py: add message parsing methods

This change extends DATAInterface class with new methods:

  - recv_raw_data() - read raw data from socket;
  - recv_l12trx_msg() - read raw data and parse as L12TRX;
  - recv_trx2l1_msg() - read raw data and parse as TRX2L1;

which would simplify the further usage of this class.

Change-Id: I761c4e63864622d3882b8f9c80ea43b58f092cb1
---
M src/target/trx_toolkit/data_if.py
1 file changed, 33 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/61/12261/1

diff --git a/src/target/trx_toolkit/data_if.py 
b/src/target/trx_toolkit/data_if.py
index f4431a4..45114ed 100644
--- a/src/target/trx_toolkit/data_if.py
+++ b/src/target/trx_toolkit/data_if.py
@@ -26,6 +26,39 @@
 from data_msg import *

 class DATAInterface(UDPLink):
+   def recv_raw_data(self):
+   data, _ = self.sock.recvfrom(512)
+   return data
+
+   def recv_l12trx_msg(self):
+   # Read raw data from socket
+   data = self.recv_raw_data()
+
+   # Attempt to parse as a L12TRX message
+   try:
+   msg = DATAMSG_L12TRX()
+   msg.parse_msg(bytearray(data))
+   except:
+   log.error("Failed to parse a L12TRX message "
+   "from R:%s:%u" % (self.remote_addr, 
self.remote_port))
+   return None
+
+   return msg
+
+   def recv_trx2l1_msg(self):
+   # Read raw data from socket
+   data = self.recv_raw_data()
+
+   # Attempt to parse as a L12TRX message
+   try:
+   msg = DATAMSG_TRX2L1()
+   msg.parse_msg(bytearray(data))
+   except:
+   log.error("Failed to parse a TRX2L1 message "
+   "from R:%s:%u" % (self.remote_addr, 
self.remote_port))
+   return None
+
+   return msg

def send_msg(self, msg):
# Validate a message

--
To view, visit https://gerrit.osmocom.org/12261
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I761c4e63864622d3882b8f9c80ea43b58f092cb1
Gerrit-Change-Number: 12261
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 


Change in osmocom-bb[master]: trx_toolkit/data_if.py: add optional legacy message coding flag

2018-12-11 Thread Vadim Yanitskiy
Vadim Yanitskiy has uploaded this change for review. ( 
https://gerrit.osmocom.org/12262


Change subject: trx_toolkit/data_if.py: add optional legacy message coding flag
..

trx_toolkit/data_if.py: add optional legacy message coding flag

Some transceivers (e.g. OsmoTRX) have inherited a rudiment from
OpenBTS - two dummy bytes at the end of every TRX2L1 message.
Despite they are absolutely useless, some L1 implementations,
such as trxcon and OpenBTS, still do expect them when
checking TRX2L1 message length.

Let's add an optional (disabled by default) argument to send_msg(),
that would enable adding those two dummy bytes.

Change-Id: I6b9a8b611ea1e9badc4d9ddf13aa9e237028e39a
---
M src/target/trx_toolkit/data_if.py
1 file changed, 6 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/62/12262/1

diff --git a/src/target/trx_toolkit/data_if.py 
b/src/target/trx_toolkit/data_if.py
index 45114ed..3366adc 100644
--- a/src/target/trx_toolkit/data_if.py
+++ b/src/target/trx_toolkit/data_if.py
@@ -60,7 +60,7 @@

return msg

-   def send_msg(self, msg):
+   def send_msg(self, msg, legacy = False):
# Validate a message
if not msg.validate():
raise ValueError("Message incomplete or incorrect")
@@ -68,5 +68,10 @@
# Generate TRX message
payload = msg.gen_msg()

+   # This is a rudiment from (legacy) OpenBTS transceiver,
+   # some L1 implementations still expect two dummy bytes.
+   if legacy:
+   payload += bytearray(2)
+
# Send message
self.send(payload)

--
To view, visit https://gerrit.osmocom.org/12262
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6b9a8b611ea1e9badc4d9ddf13aa9e237028e39a
Gerrit-Change-Number: 12262
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 


Change in osmocom-bb[master]: trx_toolkit/ctrl_if_*.py: transparently pass UDPLink arguments

2018-12-11 Thread Vadim Yanitskiy
Vadim Yanitskiy has uploaded this change for review. ( 
https://gerrit.osmocom.org/12259


Change subject: trx_toolkit/ctrl_if_*.py: transparently pass UDPLink arguments
..

trx_toolkit/ctrl_if_*.py: transparently pass UDPLink arguments

There is no need to (re)define the arguments of UDPLink's constructor.
Let's use non-keyworded variable length argument list (*args).

Change-Id: Ia312a5e15ce88d5f7e8d76c4ea8c93c59d91be5a
---
M src/target/trx_toolkit/ctrl_if_bb.py
M src/target/trx_toolkit/ctrl_if_bts.py
2 files changed, 4 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/59/12259/1

diff --git a/src/target/trx_toolkit/ctrl_if_bb.py 
b/src/target/trx_toolkit/ctrl_if_bb.py
index 785636b..fe7f3e8 100644
--- a/src/target/trx_toolkit/ctrl_if_bb.py
+++ b/src/target/trx_toolkit/ctrl_if_bb.py
@@ -34,8 +34,8 @@
tx_freq = None
pm = None

-   def __init__(self, remote_addr, remote_port, bind_addr, bind_port):
-   CTRLInterface.__init__(self, remote_addr, remote_port, 
bind_addr, bind_port)
+   def __init__(self, *udp_link_args):
+   CTRLInterface.__init__(self, *udp_link_args)
log.info("Init CTRL interface for BB (%s)" % self.desc_link())

def parse_cmd(self, request):
diff --git a/src/target/trx_toolkit/ctrl_if_bts.py 
b/src/target/trx_toolkit/ctrl_if_bts.py
index 2dde3e3..cb38b67 100644
--- a/src/target/trx_toolkit/ctrl_if_bts.py
+++ b/src/target/trx_toolkit/ctrl_if_bts.py
@@ -35,8 +35,8 @@
tx_freq = None
pm = None

-   def __init__(self, remote_addr, remote_port, bind_addr, bind_port):
-   CTRLInterface.__init__(self, remote_addr, remote_port, 
bind_addr, bind_port)
+   def __init__(self, *udp_link_args):
+   CTRLInterface.__init__(self, *udp_link_args)
log.info("Init CTRL interface for BTS (%s)" % self.desc_link())

def parse_cmd(self, request):

--
To view, visit https://gerrit.osmocom.org/12259
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia312a5e15ce88d5f7e8d76c4ea8c93c59d91be5a
Gerrit-Change-Number: 12259
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 


Change in osmocom-bb[master]: trx_toolkit/ctrl_if.py: read data from socket in handle_rx()

2018-12-11 Thread Vadim Yanitskiy
Vadim Yanitskiy has uploaded this change for review. ( 
https://gerrit.osmocom.org/12260


Change subject: trx_toolkit/ctrl_if.py: read data from socket in handle_rx()
..

trx_toolkit/ctrl_if.py: read data from socket in handle_rx()

It makes much more sense to read data from socket in handle_rx(),
instead of expecting a buffer with received data from caller.

Change-Id: I83479c60c54e36a2a7582714a6043090585957ae
---
M src/target/trx_toolkit/ctrl_if.py
M src/target/trx_toolkit/fake_trx.py
2 files changed, 7 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/60/12260/1

diff --git a/src/target/trx_toolkit/ctrl_if.py 
b/src/target/trx_toolkit/ctrl_if.py
index b533746..45bfa2b 100644
--- a/src/target/trx_toolkit/ctrl_if.py
+++ b/src/target/trx_toolkit/ctrl_if.py
@@ -27,7 +27,11 @@
 from udp_link import UDPLink

 class CTRLInterface(UDPLink):
-   def handle_rx(self, data, remote):
+   def handle_rx(self):
+   # Read data from socket
+   data, remote = self.sock.recvfrom(128)
+   data = data.decode()
+
if not self.verify_req(data):
log.error("Wrong data on CTRL interface")
return
diff --git a/src/target/trx_toolkit/fake_trx.py 
b/src/target/trx_toolkit/fake_trx.py
index d73b566..95261df 100755
--- a/src/target/trx_toolkit/fake_trx.py
+++ b/src/target/trx_toolkit/fake_trx.py
@@ -112,13 +112,11 @@

# CTRL commands from BTS
if self.bts_ctrl.sock in r_event:
-   data, addr = self.bts_ctrl.sock.recvfrom(128)
-   self.bts_ctrl.handle_rx(data.decode(), addr)
+   self.bts_ctrl.handle_rx()

# CTRL commands from BB
if self.bb_ctrl.sock in r_event:
-   data, addr = self.bb_ctrl.sock.recvfrom(128)
-   self.bb_ctrl.handle_rx(data.decode(), addr)
+   self.bb_ctrl.handle_rx()

def shutdown(self):
log.info("Shutting down...")

--
To view, visit https://gerrit.osmocom.org/12260
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I83479c60c54e36a2a7582714a6043090585957ae
Gerrit-Change-Number: 12260
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 


Change in osmocom-bb[master]: trx_toolkit/ctrl_if_bb.py: fix SETTA command handling

2018-12-11 Thread Vadim Yanitskiy
Vadim Yanitskiy has uploaded this change for review. ( 
https://gerrit.osmocom.org/12258


Change subject: trx_toolkit/ctrl_if_bb.py: fix SETTA command handling
..

trx_toolkit/ctrl_if_bb.py: fix SETTA command handling

Since I8fd2a2ab7784b38bde5ebcfd0359b7e2cb53f5a7, SETTA command
handling was broken, because the range limitation was removed
together with argument parsing. Let's fix this.

Change-Id: If582af3849359866de129504cc5b2dc6d64edbd5
---
M src/target/trx_toolkit/ctrl_if_bb.py
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/58/12258/1

diff --git a/src/target/trx_toolkit/ctrl_if_bb.py 
b/src/target/trx_toolkit/ctrl_if_bb.py
index aaa12f1..785636b 100644
--- a/src/target/trx_toolkit/ctrl_if_bb.py
+++ b/src/target/trx_toolkit/ctrl_if_bb.py
@@ -134,7 +134,7 @@
log.debug("Recv SETTA cmd")

# Save to the BurstForwarder instance
-   self.burst_fwd.ta = ta
+   self.burst_fwd.ta = int(request[1])
return 0

# Timing of Arrival simulation for Uplink

--
To view, visit https://gerrit.osmocom.org/12258
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If582af3849359866de129504cc5b2dc6d64edbd5
Gerrit-Change-Number: 12258
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 


Change in docker-playground[master]: osmo-msc: set bind ip for SGs-interface

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12248 )

Change subject: osmo-msc: set bind ip for SGs-interface
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/12248
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Icf2c36d253ce13a61fb98b4afd1739e1c321bb4b
Gerrit-Change-Number: 12248
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Tue, 11 Dec 2018 17:43:52 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-trx[master]: tests: rename convolve_test -> ConvolveTest

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12244 )

Change subject: tests: rename convolve_test -> ConvolveTest
..


Patch Set 1: Code-Review-1

> hmm, the others are *.cpp files and this is a *.c file, so the
 > naming schemes sort of match before this patch?

Agree with Neels. I'd actually move all to foo_bar, but no need to spend time 
on that :)


--
To view, visit https://gerrit.osmocom.org/12244
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4ca533ca8c5e19b6dbe7b0aba672ee14cf5c3bd1
Gerrit-Change-Number: 12244
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Tue, 11 Dec 2018 17:38:30 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-trx[master]: LMSDevice: make use of dev-args in osmo-trx.cfg

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12245 )

Change subject: LMSDevice: make use of dev-args in osmo-trx.cfg
..


Patch Set 2: Code-Review-1

(6 comments)

https://gerrit.osmocom.org/#/c/12245/2/Transceiver52M/device/lms/LMSDevice.cpp
File Transceiver52M/device/lms/LMSDevice.cpp:

https://gerrit.osmocom.org/#/c/12245/2/Transceiver52M/device/lms/LMSDevice.cpp@25
PS2, Line 25: #include 
I'm actually in process of getting rid of boost in osmo-trx code, since we only 
use it in URSP1 (and can be easily dropped completelly). Can you use something 
else?

See https://gerrit.osmocom.org/#/c/osmo-trx/+/12088/ and grep for "boost".


https://gerrit.osmocom.org/#/c/12245/2/Transceiver52M/device/lms/LMSDevice.cpp@103
PS2, Line 103:  *  \return index of first matching item or -1 (no match) */
s/item/device, I was first confused with item meaning the first key or value.


"Index of first matching item in the list or -1 (no match".


https://gerrit.osmocom.org/#/c/12245/2/Transceiver52M/device/lms/LMSDevice.cpp@109
PS2, Line 109:  boost::split(filters, args, boost::is_any_of(","));
As said, please use something else. I think there's some code you can reuse in 
./Transceiver52M/osmo-trx.cpp, see comma_delimited_to_vector() in there.

Feel free to improve it by passing a new param "separator" and then you can use 
it to first break by "," and later by "=" if required.


https://gerrit.osmocom.org/#/c/12245/2/Transceiver52M/device/lms/LMSDevice.cpp@159
PS2, Line 159:  delete [] info_list;
I know in other places is "delete []", but I think it's better having 
"delete[]" (as in https://en.cppreference.com/w/cpp/memory/new/operator_delete)


https://gerrit.osmocom.org/#/c/12245/2/Transceiver52M/device/lms/LMSDevice.cpp@163
PS2, Line 163:  LOGC(DDEV, INFO) << "Using device: " << info_list[dev_id];
May be worth printing the index too.


https://gerrit.osmocom.org/#/c/12245/2/tests/Transceiver52M/LMSDeviceTest.cpp
File tests/Transceiver52M/LMSDeviceTest.cpp:

https://gerrit.osmocom.org/#/c/12245/2/tests/Transceiver52M/LMSDeviceTest.cpp@43
PS2, Line 43:   delete [] info_list;
same (delete[])



--
To view, visit https://gerrit.osmocom.org/12245
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib9aaa066a01bf9de3f78234d7ada884d6f28c852
Gerrit-Change-Number: 12245
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Tue, 11 Dec 2018 17:37:05 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-msc[master]: fix regression: mgcp FSM: accept Assignment Complete early

2018-12-11 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/12257


Change subject: fix regression: mgcp FSM: accept Assignment Complete early
..

fix regression: mgcp FSM: accept Assignment Complete early

In recent commit [1] I broke the flow of Assignment Complete arriving before in
ST_MDCX_RAN state, because I changed a simple event omission into a failure.
Revert that bit and explain.

There was a previous comment that should have made me understand, now trying
with a bit of rewording in the hope that it might become more clear.

[1] commit 212c0c9bdaf1166e3bcbab85f3ab31dc17162f5b
"move ASS-COMPL MGCP handling out of a_iface_bssap.c"
Change-Id I8137215c443239bddf3e69b5715839a365b73b6c

Change-Id: Ic0abdc51b82b0e924b2561582310a83528fd1880
---
M src/libmsc/msc_mgcp.c
1 file changed, 7 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/57/12257/1

diff --git a/src/libmsc/msc_mgcp.c b/src/libmsc/msc_mgcp.c
index 7aeab4a..cce1175 100644
--- a/src/libmsc/msc_mgcp.c
+++ b/src/libmsc/msc_mgcp.c
@@ -1079,11 +1079,6 @@

fi = mgcp_ctx->fsm;

-   if (fi->state != ST_MDCX_RAN) {
-   LOGPFSML(fi, LOGL_ERROR, "Assignment Complete not allowed in 
this state\n");
-   return -ENOTSUP;
-   }
-
/* use address / port supplied with the AoIP transport address element 
*/
if (aoip_transport_addr->ss_family != AF_INET) {
LOGPCONN(conn, LOGL_ERROR, "Assignment Complete: Unsupported 
addressing scheme (only IPV4 supported)\n");
@@ -1109,6 +1104,13 @@

LOGPCONN(conn, LOGL_DEBUG, "Assignment Complete: rtp %s:%u\n", addr, 
port);

+   /* If the Assignment Complete arrives early, before reaching 
ST_MDCX_RAN, no event is needed, because we're
+* still waiting for other events first. We will later on detect that 
the Assignment has already concluded. */
+   if (fi->state != ST_MDCX_RAN) {
+   LOGPCONN(conn, LOGL_DEBUG, "Not yet in ST_MDCX_RAN, no need to 
dispatch EV_ASSIGN event\n");
+   return 0;
+   }
+
return osmo_fsm_inst_dispatch(fi, EV_ASSIGN, mgcp_ctx);
 }


--
To view, visit https://gerrit.osmocom.org/12257
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic0abdc51b82b0e924b2561582310a83528fd1880
Gerrit-Change-Number: 12257
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in osmo-sgsn[master]: make gsup ipa name configurable in osmo-sgsn.cfg

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12243 )

Change subject: make gsup ipa name configurable in osmo-sgsn.cfg
..


Patch Set 1: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/#/c/12243/1/src/gprs/sgsn_vty.c
File src/gprs/sgsn_vty.c:

https://gerrit.osmocom.org/#/c/12243/1/src/gprs/sgsn_vty.c@351
PS1, Line 351: {
How to go back to default? "no ipa-name" ? or "ipa-name default"?



--
To view, visit https://gerrit.osmocom.org/12243
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Tue, 11 Dec 2018 17:23:17 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: MGCP: fix pattern warning

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12237 )

Change subject: MGCP: fix pattern warning
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/12237
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I99948e4b82b5b4bd5b8f7c1a4c60a97fcab3c0eb
Gerrit-Change-Number: 12237
Gerrit-PatchSet: 2
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: dexter 
Gerrit-Comment-Date: Tue, 11 Dec 2018 17:20:36 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: MGCP: fix pattern warning

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12237 )

Change subject: MGCP: fix pattern warning
..


Patch Set 2: Code-Review-1


--
To view, visit https://gerrit.osmocom.org/12237
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I99948e4b82b5b4bd5b8f7c1a4c60a97fcab3c0eb
Gerrit-Change-Number: 12237
Gerrit-PatchSet: 2
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: dexter 
Gerrit-Comment-Date: Tue, 11 Dec 2018 17:20:27 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: MGCP: fix pattern warning

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has removed a vote on this change.

Change subject: MGCP: fix pattern warning
..


Removed Code-Review-1 by Pau Espin Pedrol 
--
To view, visit https://gerrit.osmocom.org/12237
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: deleteVote
Gerrit-Change-Id: I99948e4b82b5b4bd5b8f7c1a4c60a97fcab3c0eb
Gerrit-Change-Number: 12237
Gerrit-PatchSet: 2
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: dexter 


Change in osmo-ttcn3-hacks[master]: MGCP: remove commented variants

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12238 )

Change subject: MGCP: remove commented variants
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/12238
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3f11a93634fc50243a7210edcd501bd4b90d6dcd
Gerrit-Change-Number: 12238
Gerrit-PatchSet: 2
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: dexter 
Gerrit-Comment-Date: Tue, 11 Dec 2018 17:20:20 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: Remove -Wall for autogenerated code

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12241 )

Change subject: Remove -Wall for autogenerated code
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/12241
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7ef141f7f3370a1bf909845ce8a4eb650b33fa81
Gerrit-Change-Number: 12241
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Tue, 11 Dec 2018 17:19:11 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: bsc: dtap: Set subscr log context

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/12255


Change subject: bsc: dtap: Set subscr log context
..

bsc: dtap: Set subscr log context

Change-Id: I362a7d10f5ca9a95b594f7caafd7ed5b10fd059a
---
M src/osmo-bsc/gsm_08_08.c
M src/osmo-bsc/osmo_bsc_bssap.c
2 files changed, 11 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/55/12255/1

diff --git a/src/osmo-bsc/gsm_08_08.c b/src/osmo-bsc/gsm_08_08.c
index c3c5000..2c6a689 100644
--- a/src/osmo-bsc/gsm_08_08.c
+++ b/src/osmo-bsc/gsm_08_08.c
@@ -602,8 +602,10 @@
 {
int lu_cause;

+   log_set_context(LOG_CTX_BSC_SUBSCR, conn->bsub);
+
if (!msc_connected(conn))
-   return;
+   goto done;

LOGP(DMSC, LOGL_INFO, "Tx MSC DTAP LINK_ID=0x%02x\n", link_id);

@@ -612,7 +614,7 @@
 * to handle it. If it was handled we will return.
 */
if (handle_cc_setup(conn, msg) >= 1)
-   return;
+   goto done;

/* Check the filter */
if (bsc_filter_data(conn, msg, _cause) < 0) {
@@ -620,7 +622,7 @@
conn->filter_state.con_type,
lu_cause);
bsc_clear_request(conn, 0);
-   return;
+   goto done;
}

bsc_scan_bts_msg(conn, msg);
@@ -628,6 +630,9 @@
/* Store link_id in msg->cb */
OBSC_LINKID_CB(msg) = link_id;
osmo_fsm_inst_dispatch(conn->fi, GSCON_EV_MO_DTAP, msg);
+done:
+   log_set_context(LOG_CTX_BSC_SUBSCR, NULL);
+   return;
 }

 /*! BSC->MSC: RR conn has been cleared. */
diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index 39425f6..b5ff152 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -980,6 +980,8 @@
 int bsc_handle_dt(struct gsm_subscriber_connection *conn,
  struct msgb *msg, unsigned int len)
 {
+   log_set_context(LOG_CTX_BSC_SUBSCR, conn->bsub);
+
if (len < sizeof(struct bssmap_header)) {
LOGP(DMSC, LOGL_ERROR, "The header is too short.\n");
}
@@ -997,6 +999,7 @@
gsm0808_bssap_name(msg->l3h[0]));
}

+   log_set_context(LOG_CTX_BSC_SUBSCR, NULL);
return -1;
 }


--
To view, visit https://gerrit.osmocom.org/12255
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I362a7d10f5ca9a95b594f7caafd7ed5b10fd059a
Gerrit-Change-Number: 12255
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-bsc[master]: VTY: Allow logging filter imsi statements for IMSIs we haven't seen yet

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/12250


Change subject: VTY: Allow logging filter imsi statements for IMSIs we haven't 
seen yet
..

VTY: Allow logging filter imsi statements for IMSIs we haven't seen yet

Limiting the logging filter only to IMSIs that we have as local
subscriber doesn't make sense for osmo-bsc since all subscribers are
initially unknown.

Create a bsc subscriber and enable logging there. This struct will then
be used and liked to the gsm_subscr_conn when receiving the Location
update.

Related: OS#3641
Change-Id: Ia20bdc15565417020205d7b2b06b04a01c03106c
---
M src/osmo-bsc/osmo_bsc_vty.c
1 file changed, 8 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/50/12250/1

diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c
index a32f580..6e3d1c1 100644
--- a/src/osmo-bsc/osmo_bsc_vty.c
+++ b/src/osmo-bsc/osmo_bsc_vty.c
@@ -886,15 +886,21 @@
struct log_target *tgt = osmo_log_vty2tgt(vty);
const char *imsi = argv[0];

-   bsc_subscr = bsc_subscr_find_by_imsi(bsc_gsmnet->bsc_subscribers, imsi);
+   if (!tgt)
+   return CMD_WARNING;
+
+   bsc_subscr = 
bsc_subscr_find_or_create_by_imsi(bsc_gsmnet->bsc_subscribers, imsi);

if (!bsc_subscr) {
-   vty_out(vty, "%%no subscriber with IMSI(%s)%s",
+   vty_out(vty, "%%failed to enable logging for subscriber with 
IMSI(%s)%s",
imsi, VTY_NEWLINE);
return CMD_WARNING;
}

log_set_filter_bsc_subscr(tgt, bsc_subscr);
+   /* log_set_filter has grabbed its own reference  */
+   bsc_subscr_put(bsc_subscr);
+
return CMD_SUCCESS;
 }


-- 
To view, visit https://gerrit.osmocom.org/12250
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia20bdc15565417020205d7b2b06b04a01c03106c
Gerrit-Change-Number: 12250
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: daniel 


Change in osmo-bsc[master]: bsc: bssap: Set subscr log context during paging

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/12256


Change subject: bsc: bssap: Set subscr log context during paging
..

bsc: bssap: Set subscr log context during paging

Change-Id: I3998a35ff6ea29440882514bbb30cafed66f03fa
---
M src/osmo-bsc/osmo_bsc_bssap.c
1 file changed, 8 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/56/12256/1

diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index b5ff152..b5a1503 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -96,11 +96,15 @@
struct bsc_subscr *subscr;
int ret;

+   subscr = 
bsc_subscr_find_or_create_by_imsi(msc->network->bsc_subscribers,
+  mi_string);
+
+   if(subscr)
+   log_set_context(LOG_CTX_BSC_SUBSCR, subscr);
+
LOGP(DMSC, LOGL_INFO, "Paging request from MSC BTS: %d IMSI: '%s' TMSI: 
'0x%x/%u' LAC: 0x%x\n",
bts->nr, mi_string, tmsi, tmsi, lac);

-   subscr = 
bsc_subscr_find_or_create_by_imsi(msc->network->bsc_subscribers,
-  mi_string);
if (!subscr) {
LOGP(DMSC, LOGL_ERROR, "Paging request failed: Could not 
allocate subscriber for %s\n", mi_string);
return;
@@ -116,6 +120,8 @@

/* the paging code has grabbed its own references */
bsc_subscr_put(subscr);
+
+   log_set_context(LOG_CTX_BSC_SUBSCR, NULL);
 }

 static void

--
To view, visit https://gerrit.osmocom.org/12256
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3998a35ff6ea29440882514bbb30cafed66f03fa
Gerrit-Change-Number: 12256
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-bsc[master]: paging: fix whitespace

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/12249


Change subject: paging: fix whitespace
..

paging: fix whitespace

Change-Id: I81c4a9f0dbd708df27a485ef764c9524a36d548a
---
M src/osmo-bsc/paging.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/49/12249/1

diff --git a/src/osmo-bsc/paging.c b/src/osmo-bsc/paging.c
index 246114f..03f940c 100644
--- a/src/osmo-bsc/paging.c
+++ b/src/osmo-bsc/paging.c
@@ -267,7 +267,7 @@
return 1;
}

-   return 0;
+   return 0;
 }

 /*! Call-back once T3113 (paging timeout) expires for given paging_request */

--
To view, visit https://gerrit.osmocom.org/12249
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I81c4a9f0dbd708df27a485ef764c9524a36d548a
Gerrit-Change-Number: 12249
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-bsc[master]: bsc: Set subscr log context during complete_layer3

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/12253


Change subject: bsc: Set subscr log context during complete_layer3
..

bsc: Set subscr log context during complete_layer3

Change-Id: I162a474f711248a3f64a0438967fa6f8a9a3e686
---
M src/osmo-bsc/gsm_08_08.c
1 file changed, 16 insertions(+), 10 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/53/12253/1

diff --git a/src/osmo-bsc/gsm_08_08.c b/src/osmo-bsc/gsm_08_08.c
index a3e8b30..c3c5000 100644
--- a/src/osmo-bsc/gsm_08_08.c
+++ b/src/osmo-bsc/gsm_08_08.c
@@ -433,12 +433,14 @@
enum bsc_con ret;
struct gsm0808_speech_codec_list scl;
 
+   log_set_context(LOG_CTX_BSC_SUBSCR, conn->bsub);
+
/* Check the filter */
rc = bsc_filter_initial(msc->network->bsc_data, msc, conn, msg,
, _type, _cause);
if (rc < 0) {
bsc_maybe_lu_reject(conn, con_type, lu_cause);
-   return false;
+   goto early_fail;
}

/* allocate resource for a new connection */
@@ -450,8 +452,7 @@
bsc_send_ussd_no_srv(conn, msg, msc->ussd_msc_lost_txt);
else if (ret == BSC_CON_REJECT_RF_GRACE)
bsc_send_ussd_no_srv(conn, msg, msc->ussd_grace_txt);
-
-   return false;
+   goto early_fail;
}

/* TODO: also extract TMSI. We get an IMSI only when an initial L3 
Complete comes in that
@@ -460,15 +461,18 @@
if (imsi) {
conn->filter_state.imsi = talloc_steal(conn, imsi);
if (conn->bsub) {
+   log_set_context(LOG_CTX_BSC_SUBSCR, conn->bsub);
/* Already a subscriber on L3 Complete? Should never 
happen... */
if (conn->bsub->imsi[0]
&& strcmp(conn->bsub->imsi, imsi))
LOGP(DMSC, LOGL_ERROR, "Subscriber's IMSI 
changes from %s to %s\n",
 conn->bsub->imsi, imsi);
bsc_subscr_set_imsi(conn->bsub, imsi);
-   } else
+   } else {
conn->bsub = 
bsc_subscr_find_or_create_by_imsi(msc->network->bsc_subscribers,
   imsi);
+   log_set_context(LOG_CTX_BSC_SUBSCR, conn->bsub);
+   }
gscon_update_id(conn);
}
conn->filter_state.con_type = con_type;
@@ -493,14 +497,16 @@
} else
resp = gsm0808_create_layer3_2(msg, cgi_for_msc(conn->sccp.msc, 
conn_get_bts(conn)), NULL);

-   if (!resp) {
+   if (resp)
+   osmo_fsm_inst_dispatch(conn->fi, GSCON_EV_A_CONN_REQ, resp);
+   else
LOGP(DMSC, LOGL_DEBUG, "Failed to create layer3 message.\n");
-   return false;
-   }

-   osmo_fsm_inst_dispatch(conn->fi, GSCON_EV_A_CONN_REQ, resp);
-
-   return true;
+   log_set_context(LOG_CTX_BSC_SUBSCR, NULL);
+   return !!resp;
+early_fail:
+   log_set_context(LOG_CTX_BSC_SUBSCR, NULL);
+   return false;
 }

 /*

--
To view, visit https://gerrit.osmocom.org/12253
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I162a474f711248a3f64a0438967fa6f8a9a3e686
Gerrit-Change-Number: 12253
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-bsc[master]: paging: Properly enclose logging imsi filter scope

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/12251


Change subject: paging: Properly enclose logging imsi filter scope
..

paging: Properly enclose logging imsi filter scope

Otherwise all logging is kept enabled after passing through those code
paths.

Change-Id: I06a977d97e6ffea02ec7402d48410c0e7cc6c155
---
M src/osmo-bsc/paging.c
1 file changed, 3 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/51/12251/1

diff --git a/src/osmo-bsc/paging.c b/src/osmo-bsc/paging.c
index 03f940c..2c9d5cd 100644
--- a/src/osmo-bsc/paging.c
+++ b/src/osmo-bsc/paging.c
@@ -285,6 +285,8 @@

/* destroy it now. Do not access req afterwards */
paging_remove_request(>bts->paging, req);
+
+   log_set_context(LOG_CTX_BSC_SUBSCR, NULL);
 }

 #define GSM_FRAME_DURATION_us  4615
@@ -440,6 +442,7 @@
continue;
_paging_request_stop(bts, bsub, NULL, NULL);
}
+   log_set_context(LOG_CTX_BSC_SUBSCR, NULL);
 }



--
To view, visit https://gerrit.osmocom.org/12251
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I06a977d97e6ffea02ec7402d48410c0e7cc6c155
Gerrit-Change-Number: 12251
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-bsc[master]: bsc_main: filter_fn: Compare imsi values instead of subscr pointers

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/12252


Change subject: bsc_main: filter_fn: Compare imsi values instead of subscr 
pointers
..

bsc_main: filter_fn: Compare imsi values instead of subscr pointers

Since we actually want to match by IMSI as specified by filter in VTY.
It will allow to match based on other information later.

Change-Id: Ia73fd2f38e42396db8f6d2cc6b2c163aa8f67f3f
---
M src/osmo-bsc/osmo_bsc_main.c
1 file changed, 5 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/52/12252/1

diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c
index 67fccd3..08bb40d 100644
--- a/src/osmo-bsc/osmo_bsc_main.c
+++ b/src/osmo-bsc/osmo_bsc_main.c
@@ -35,6 +35,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 

@@ -767,10 +768,12 @@

 static int filter_fn(const struct log_context *ctx, struct log_target *tar)
 {
-   const struct bsc_subscr *bsub = ctx->ctx[LOG_CTX_BSC_SUBSCR];
+   const struct bsc_subscr *bsub_ctx = ctx->ctx[LOG_CTX_BSC_SUBSCR];
+   const struct bsc_subscr *bsub_filter = 
tar->filter_data[LOG_FLT_BSC_SUBSCR];

if ((tar->filter_map & (1 << LOG_FLT_BSC_SUBSCR)) != 0
-   && bsub && bsub == tar->filter_data[LOG_FLT_BSC_SUBSCR])
+   && bsub_ctx && bsub_filter
+   && strncmp(bsub_ctx->imsi, bsub_filter->imsi, 
sizeof(bsub_ctx->imsi)) == 0)
return 1;

return 0;

--
To view, visit https://gerrit.osmocom.org/12252
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia73fd2f38e42396db8f6d2cc6b2c163aa8f67f3f
Gerrit-Change-Number: 12252
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-bsc[master]: bsc: rsl: Set subscr log context during meas report

2018-12-11 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/12254


Change subject: bsc: rsl: Set subscr log context during meas report
..

bsc: rsl: Set subscr log context during meas report

Change-Id: Idc6af592e870d15491797ae6fcaffaac2b411766
---
M src/osmo-bsc/abis_rsl.c
1 file changed, 9 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/54/12254/1

diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index 954fb0f..8ffb07e 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -917,11 +917,14 @@
 {
int i;
const char *name = "";
+   struct bsc_subscr *bsub = NULL;

if (lchan && lchan->conn) {
-   if (lchan->conn->bsub)
-   name = bsc_subscr_name(lchan->conn->bsub);
-   else
+   bsub = lchan->conn->bsub;
+   if (bsub) {
+   log_set_context(LOG_CTX_BSC_SUBSCR, bsub);
+   name = bsc_subscr_name(bsub);
+   } else
name = lchan->name;
}

@@ -960,6 +963,9 @@
DEBUGP(DMEAS, "IDX=%u ARFCN=%u BSIC=%u => %d dBm\n",
mrc->neigh_idx, mrc->arfcn, mrc->bsic, 
rxlev2dbm(mrc->rxlev));
}
+
+   if (bsub)
+   log_set_context(LOG_CTX_BSC_SUBSCR, NULL);
 }

 static struct gsm_meas_rep *lchan_next_meas_rep(struct gsm_lchan *lchan)

--
To view, visit https://gerrit.osmocom.org/12254
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idc6af592e870d15491797ae6fcaffaac2b411766
Gerrit-Change-Number: 12254
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in docker-playground[master]: osmo-msc: set bind ip for SGs-interface

2018-12-11 Thread dexter
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/12248


Change subject: osmo-msc: set bind ip for SGs-interface
..

osmo-msc: set bind ip for SGs-interface

By default the SGs interface binds on 127.0.0.1 but in order to make it
reachable for the ttcn3 testsuite, we need to bind it to 0.0.0.0.

Change-Id: Icf2c36d253ce13a61fb98b4afd1739e1c321bb4b
Related: OS#3615
Depends: osmo-msc I73359925fc1ca72b33a1466e6ac41307f2f0b11d
---
M ttcn3-msc-test/osmo-msc.cfg
1 file changed, 2 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/48/12248/1

diff --git a/ttcn3-msc-test/osmo-msc.cfg b/ttcn3-msc-test/osmo-msc.cfg
index f0180d8..39a0354 100644
--- a/ttcn3-msc-test/osmo-msc.cfg
+++ b/ttcn3-msc-test/osmo-msc.cfg
@@ -85,3 +85,5 @@
 hlr
  remote-ip 172.18.1.103
  remote-port 4222
+sgs
+ local-ip 0.0.0.0

--
To view, visit https://gerrit.osmocom.org/12248
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icf2c36d253ce13a61fb98b4afd1739e1c321bb4b
Gerrit-Change-Number: 12248
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 


Change in osmo-ttcn3-hacks[master]: WIP: MSC_Tests: Add SGs testcases

2018-12-11 Thread dexter
dexter has uploaded a new patch set (#16) to the change originally created by 
Harald Welte. ( https://gerrit.osmocom.org/11488 )

Change subject: WIP: MSC_Tests: Add SGs testcases
..

WIP: MSC_Tests: Add SGs testcases

This extens MSC_Tests.ttcn with an initial set of SGs interface test
cases for RESET, LU, DETACH, PAGING, SMS and CSFB procedures

In particular the following testcases are added:

- TC_sgsap_reset: isolated reset procedure test
- TC_sgsap_lu: isolated location update with TMSI realloc
- TC_sgsap_lu_imsi_reject: location update, reject case
- TC_sgsap_lu_and_nothing: location update with failed TMSI realloc
- TC_sgsap_expl_imsi_det_eps: detach from EPS serveces
- TC_sgsap_expl_imsi_det_noneps: detach from non-EPS services
- TC_sgsap_paging_rej: isolated paging, reject case
- TC_sgsap_paging_subscr_rej: isolated paging, subscr rejects call
- TC_sgsap_paging_ue_unr: isolated paging, ue is unreachable
- TC_sgsap_paging_and_nothing: page, but don't respond
- TC_sgsap_mt_sms: mobile terminated SMS through SGs Interface
- TC_sgsap_mo_sms: mobile originated SMS through SGs Interface
- TC_sgsap_mt_sms_and_nothing: trigger SMS, but don't respond to paging
- TC_sgsap_mt_sms_and_reject: trigger SMS, but reject paging
- TC_sgsap_unexp_ud: Send unexpected unitdata (SGs Association: NULL)
- TC_sgsap_unsol_ud: Send unsolicited unitdata (subscriber not in VLR)
- TC_sgsap_lu_and_mt_call: Initiate MT call via SGs, then do CSFB

Change-Id: I38543c35a9e74cea276e58d1d7ef01ef07ffe858
Depends: docker-playground Icf2c36d253ce13a61fb98b4afd1739e1c321bb4b
Related: OS#3645
---
M library/SGsAP_Emulation.ttcn
M library/SGsAP_Templates.ttcn
M msc/BSC_ConnectionHandler.ttcn
M msc/MSC_Tests.ttcn
M msc/expected-results.xml
M msc/gen_links.sh
M msc/regen_makefile.sh
7 files changed, 972 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/88/11488/16
--
To view, visit https://gerrit.osmocom.org/11488
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I38543c35a9e74cea276e58d1d7ef01ef07ffe858
Gerrit-Change-Number: 11488
Gerrit-PatchSet: 16
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmo-pcu[master]: cosmetic: move bit counter outside of egprs_window_size()

2018-12-11 Thread Max
Max has uploaded this change for review. ( https://gerrit.osmocom.org/12247


Change subject: cosmetic: move bit counter outside of egprs_window_size()
..

cosmetic: move bit counter outside of egprs_window_size()

As a preparation to moving window size calculation to C code, let's move
bit counter call outside. It makes more sense that way as well because
egprs_window_size() now deals with actual number of allocated slots
instead of raw bitmap.

Change-Id: I5b59919e7b4c9fd2c91958659bafe470ed8fcff7
---
M src/tbf.cpp
M src/tbf_dl.cpp
M src/tbf_ul.cpp
3 files changed, 2 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/47/12247/1

diff --git a/src/tbf.cpp b/src/tbf.cpp
index 6792d08..832aa60 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -500,8 +500,6 @@

 uint16_t egprs_window_size(const struct gprs_rlcmac_bts *bts_data, uint8_t 
slots)
 {
-   uint8_t num_pdch = pcu_bitcount(slots);
-
return OSMO_MIN((num_pdch != 1) ? (128 * num_pdch) : 192,
OSMO_MAX(64, (bts_data->ws_base + num_pdch * 
bts_data->ws_pdch) / 32 * 32));
 }
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index 01331a6..a3fef2c 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -1358,7 +1358,7 @@
 void gprs_rlcmac_dl_tbf::set_window_size()
 {
const struct gprs_rlcmac_bts *b = bts->bts_data();
-   uint16_t ws = egprs_window_size(b, dl_slots());
+   uint16_t ws = egprs_window_size(b, pcu_bitcount(dl_slots()));
LOGPTBFDL(this, LOGL_INFO, "setting EGPRS DL window size to %u, 
base(%u) slots(%u) ws_pdch(%u)\n",
  ws, b->ws_base, pcu_bitcount(dl_slots()), b->ws_pdch);
m_window.set_ws(ws);
diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp
index f877484..9233f2c 100644
--- a/src/tbf_ul.cpp
+++ b/src/tbf_ul.cpp
@@ -594,7 +594,7 @@
 void gprs_rlcmac_ul_tbf::set_window_size()
 {
const struct gprs_rlcmac_bts *b = bts->bts_data();
-   uint16_t ws = egprs_window_size(b, ul_slots());
+   uint16_t ws = egprs_window_size(b, pcu_bitcount(ul_slots()));
LOGPTBFUL(this, LOGL_INFO, "setting EGPRS UL window size to %u, 
base(%u) slots(%u) ws_pdch(%u)\n",
  ws, b->ws_base, pcu_bitcount(ul_slots()), b->ws_pdch);
m_window.set_ws(ws);

--
To view, visit https://gerrit.osmocom.org/12247
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b59919e7b4c9fd2c91958659bafe470ed8fcff7
Gerrit-Change-Number: 12247
Gerrit-PatchSet: 1
Gerrit-Owner: Max 


Change in osmo-pcu[master]: cosmetic: use const pointer for bts_data

2018-12-11 Thread Max
Max has uploaded this change for review. ( https://gerrit.osmocom.org/12246


Change subject: cosmetic: use const pointer for bts_data
..

cosmetic: use const pointer for bts_data

It's used several time for logging so let's call it once to make code
easier to follow.

Change-Id: Icfd9e5603a5d8701f487f17e9c0335d458e9e80b
---
M src/tbf_dl.cpp
M src/tbf_ul.cpp
2 files changed, 6 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/46/12246/1

diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index dd24963..01331a6 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -1357,9 +1357,10 @@

 void gprs_rlcmac_dl_tbf::set_window_size()
 {
-   uint16_t ws = egprs_window_size(bts->bts_data(), dl_slots());
+   const struct gprs_rlcmac_bts *b = bts->bts_data();
+   uint16_t ws = egprs_window_size(b, dl_slots());
LOGPTBFDL(this, LOGL_INFO, "setting EGPRS DL window size to %u, 
base(%u) slots(%u) ws_pdch(%u)\n",
- ws, bts->bts_data()->ws_base, pcu_bitcount(dl_slots()), 
bts->bts_data()->ws_pdch);
+ ws, b->ws_base, pcu_bitcount(dl_slots()), b->ws_pdch);
m_window.set_ws(ws);
 }

diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp
index 02f4ddb..f877484 100644
--- a/src/tbf_ul.cpp
+++ b/src/tbf_ul.cpp
@@ -593,8 +593,9 @@

 void gprs_rlcmac_ul_tbf::set_window_size()
 {
-   uint16_t ws = egprs_window_size(bts->bts_data(), ul_slots());
+   const struct gprs_rlcmac_bts *b = bts->bts_data();
+   uint16_t ws = egprs_window_size(b, ul_slots());
LOGPTBFUL(this, LOGL_INFO, "setting EGPRS UL window size to %u, 
base(%u) slots(%u) ws_pdch(%u)\n",
- ws, bts->bts_data()->ws_base, pcu_bitcount(ul_slots()), 
bts->bts_data()->ws_pdch);
+ ws, b->ws_base, pcu_bitcount(ul_slots()), b->ws_pdch);
m_window.set_ws(ws);
 }

--
To view, visit https://gerrit.osmocom.org/12246
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icfd9e5603a5d8701f487f17e9c0335d458e9e80b
Gerrit-Change-Number: 12246
Gerrit-PatchSet: 1
Gerrit-Owner: Max 


Change in osmo-trx[master]: tests: rename convolve_test -> ConvolveTest

2018-12-11 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/12244 )

Change subject: tests: rename convolve_test -> ConvolveTest
..


Patch Set 1: Code-Review-1

hmm, the others are *.cpp files and this is a *.c file, so the naming schemes 
sort of match before this patch?


--
To view, visit https://gerrit.osmocom.org/12244
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4ca533ca8c5e19b6dbe7b0aba672ee14cf5c3bd1
Gerrit-Change-Number: 12244
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Comment-Date: Tue, 11 Dec 2018 16:01:32 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-trx[master]: LMSDevice: make use of dev-args in osmo-trx.cfg

2018-12-11 Thread osmith
osmith has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/12245 )

Change subject: LMSDevice: make use of dev-args in osmo-trx.cfg
..

LMSDevice: make use of dev-args in osmo-trx.cfg

Allow selecting a specific LimeSDR device by setting dev-args in the
config file. Split up the given dev-args address by comma and select
the device where all substrings can be found.

I could not test this with real hardware, but I have added a test case
to make sure this works as expected.

Related: OS#3654
Change-Id: Ib9aaa066a01bf9de3f78234d7ada884d6f28c852
---
M .gitignore
M Transceiver52M/device/lms/LMSDevice.cpp
A tests/Transceiver52M/LMSDeviceTest.cpp
M tests/Transceiver52M/Makefile.am
M tests/testsuite.at
5 files changed, 101 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/45/12245/2
--
To view, visit https://gerrit.osmocom.org/12245
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib9aaa066a01bf9de3f78234d7ada884d6f28c852
Gerrit-Change-Number: 12245
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-CC: Jenkins Builder (102)


Change in osmo-trx[master]: LMSDevice: make use of dev-args in osmo-trx.cfg

2018-12-11 Thread osmith
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/12245


Change subject: LMSDevice: make use of dev-args in osmo-trx.cfg
..

LMSDevice: make use of dev-args in osmo-trx.cfg

Allow selecting a specific LimeSDR device by setting dev-args in the
config file. Split up the given dev-args address by comma and select
the device where all substrings can be found.

I could not test this with real hardware, but I have added a test case
to make sure this works as expected.

Related: OS#3654
Change-Id: Ib9aaa066a01bf9de3f78234d7ada884d6f28c852
---
M .gitignore
M Transceiver52M/device/lms/LMSDevice.cpp
A tests/Transceiver52M/LMSDeviceTest.cpp
M tests/Transceiver52M/Makefile.am
M tests/testsuite.at
5 files changed, 103 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/45/12245/1

diff --git a/.gitignore b/.gitignore
index 92fc723..68ca4b1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,6 +18,7 @@
 tests/CommonLibs/VectorTest
 tests/CommonLibs/PRBSTest
 tests/Transceiver52M/ConvolveTest
+tests/Transceiver52M/LMSDeviceTest

 # automake/autoconf
 *.in
diff --git a/Transceiver52M/device/lms/LMSDevice.cpp 
b/Transceiver52M/device/lms/LMSDevice.cpp
index 5e21894..a727d30 100644
--- a/Transceiver52M/device/lms/LMSDevice.cpp
+++ b/Transceiver52M/device/lms/LMSDevice.cpp
@@ -22,6 +22,7 @@
 #include "Threads.h"
 #include "LMSDevice.h"

+#include 
 #include 

 #include 
@@ -95,6 +96,35 @@
   << " Step=" << range->step;
 }

+/*! Find the device string that matches all filters from \a args.
+ *  \param[in] info_list device addresses found by LMS_GetDeviceList()
+ *  \param[in] count length of info_list
+ *  \param[in] args dev-args value from osmo-trx.cfg, containing comma 
separated key=value pairs
+ *  \return index of first matching item or -1 (no match) */
+int info_list_find(lms_info_str_t* info_list, unsigned int count, const 
std::string )
+{
+   unsigned int i, j;
+   vector filters;
+
+   boost::split(filters, args, boost::is_any_of(","));
+
+   /* iterate over device addresses */
+   for (i=0; i < count; i++) {
+   /* check if all filters match */
+   bool match = true;
+   for (j=0; j < filters.size(); j++) {
+   if (!strstr(info_list[i], filters[j].c_str())) {
+   match = false;
+   break;
+   }
+   }
+
+   if (match)
+   return i;
+   }
+   return -1;
+}
+
 int LMSDevice::open(const std::string , int ref, bool swap_channels)
 {
//lms_info_str_t dev_str;
@@ -103,7 +133,7 @@
float_type sr_host, sr_rf, lpfbw_rx, lpfbw_tx;
uint16_t dac_val;
unsigned int i, n;
-   int rc;
+   int rc, dev_id;

LOGC(DDEV, INFO) << "Opening LMS device..";

@@ -123,7 +153,17 @@
for (i = 0; i < n; i++)
LOGC(DDEV, INFO) << "Device [" << i << "]: " << info_list[i];

-   rc = LMS_Open(_lms_dev, info_list[0], NULL);
+   dev_id = info_list_find(info_list, n, args);
+
+   if (dev_id != -1)
+   LOGC(DDEV, INFO) << "Using device: " << info_list[dev_id];
+   else {
+   LOGC(DDEV, ERROR) << "No LMS device found with address '" << 
args << "'";
+   delete [] info_list;
+   return -1;
+   }
+
+   rc = LMS_Open(_lms_dev, info_list[dev_id], NULL);
if (rc != 0) {
LOGC(DDEV, ERROR) << "LMS_GetDeviceList() failed)";
delete [] info_list;
diff --git a/tests/Transceiver52M/LMSDeviceTest.cpp 
b/tests/Transceiver52M/LMSDeviceTest.cpp
new file mode 100644
index 000..bca12df
--- /dev/null
+++ b/tests/Transceiver52M/LMSDeviceTest.cpp
@@ -0,0 +1,45 @@
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+extern "C"
+{
+   size_t osmo_strlcpy(char *dst, const char *src, size_t siz);
+}
+
+int info_list_find(lms_info_str_t* info_list, unsigned int count, const 
std::string );
+
+using namespace std;
+
+int main(void)
+{
+   unsigned int count;
+   lms_info_str_t* info_list;
+   std::string args;
+
+   /* two fake entries for info_list */
+   count = 2;
+   info_list = new lms_info_str_t[count];
+   osmo_strlcpy(info_list[0], "LimeSDR Mini, addr=24607:1337, 
serial=FAKESERIAL0001", sizeof(lms_info_str_t));
+   osmo_strlcpy(info_list[1], "LimeSDR Mini, addr=24607:1338, 
serial=FAKESERIAL0002", sizeof(lms_info_str_t));
+
+   /* find second entry by args filter */
+   args = "serial=FAKESERIAL0002,LimeSDR Mini";
+   assert(info_list_find(info_list, count, args) == 1);
+
+   /* empty args -> first entry */
+   args = "";
+   assert(info_list_find(info_list, count, args) == 0);
+
+   /* not matching args -> -1 */
+   args = "serial=NOTMATCHING";
+   

Change in osmo-trx[master]: tests: rename convolve_test -> ConvolveTest

2018-12-11 Thread osmith
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/12244


Change subject: tests: rename convolve_test -> ConvolveTest
..

tests: rename convolve_test -> ConvolveTest

Make the test's name consistent with all other tests in this
repository. This makes adding new tests to
tests/Transceiver52M/Makefile.am less awkward (follow-up commit),
because it is clear now which casing should be used.

Change-Id: I4ca533ca8c5e19b6dbe7b0aba672ee14cf5c3bd1
---
M .gitignore
R tests/Transceiver52M/ConvolveTest.c
R tests/Transceiver52M/ConvolveTest.ok
M tests/Transceiver52M/Makefile.am
M tests/testsuite.at
5 files changed, 12 insertions(+), 12 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/44/12244/1

diff --git a/.gitignore b/.gitignore
index ad4c4e3..92fc723 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,7 +17,7 @@
 tests/CommonLibs/URLEncodeTest
 tests/CommonLibs/VectorTest
 tests/CommonLibs/PRBSTest
-tests/Transceiver52M/convolve_test
+tests/Transceiver52M/ConvolveTest

 # automake/autoconf
 *.in
diff --git a/tests/Transceiver52M/convolve_test.c 
b/tests/Transceiver52M/ConvolveTest.c
similarity index 100%
rename from tests/Transceiver52M/convolve_test.c
rename to tests/Transceiver52M/ConvolveTest.c
diff --git a/tests/Transceiver52M/convolve_test.ok 
b/tests/Transceiver52M/ConvolveTest.ok
similarity index 100%
rename from tests/Transceiver52M/convolve_test.ok
rename to tests/Transceiver52M/ConvolveTest.ok
diff --git a/tests/Transceiver52M/Makefile.am b/tests/Transceiver52M/Makefile.am
index 06db5b0..a9d3992 100644
--- a/tests/Transceiver52M/Makefile.am
+++ b/tests/Transceiver52M/Makefile.am
@@ -2,17 +2,17 @@

 AM_CFLAGS = -Wall -I$(top_srcdir)/Transceiver52M 
-I$(top_srcdir)/Transceiver52M/arch/common $(STD_DEFINES_AND_INCLUDES) -g

-EXTRA_DIST = convolve_test.ok
+EXTRA_DIST = ConvolveTest.ok

 noinst_PROGRAMS = \
-   convolve_test
+   ConvolveTest

-convolve_test_SOURCES = convolve_test.c
-convolve_test_CFLAGS = $(AM_CFLAGS)
-convolve_test_LDADD = $(COMMON_LA) $(ARCH_LA)
+ConvolveTest_SOURCES = ConvolveTest.c
+ConvolveTest_CFLAGS = $(AM_CFLAGS)
+ConvolveTest_LDADD = $(COMMON_LA) $(ARCH_LA)
 if HAVE_SSE3
-convolve_test_CFLAGS += $(SIMD_FLAGS)
+ConvolveTest_CFLAGS += $(SIMD_FLAGS)
 endif
 if HAVE_SSE4_1
-convolve_test_CFLAGS += $(SIMD_FLAGS)
+ConvolveTest_CFLAGS += $(SIMD_FLAGS)
 endif
diff --git a/tests/testsuite.at b/tests/testsuite.at
index f84225e..1968481 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -44,10 +44,10 @@
 AT_CHECK([$abs_top_builddir/tests/CommonLibs/VectorTest], [], [expout], [])
 AT_CLEANUP

-AT_SETUP([convolve_test])
-AT_KEYWORDS([convolve_test])
+AT_SETUP([ConvolveTest])
+AT_KEYWORDS([ConvolveTest])
 # Different results for i686, x86_64 and ARM. see  OS#2826, OS#2828, and 
https://lists.osmocom.org/pipermail/openbsc/2018-January/011655.html
 AT_SKIP_IF(true)
-cat $abs_srcdir/Transceiver52M/convolve_test.ok > expout
-AT_CHECK([$abs_top_builddir/tests/Transceiver52M/convolve_test], [], [expout], 
[])
+cat $abs_srcdir/Transceiver52M/ConvolveTest.ok > expout
+AT_CHECK([$abs_top_builddir/tests/Transceiver52M/ConvolveTest], [], [expout], 
[])
 AT_CLEANUP

--
To view, visit https://gerrit.osmocom.org/12244
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4ca533ca8c5e19b6dbe7b0aba672ee14cf5c3bd1
Gerrit-Change-Number: 12244
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 


Change in osmo-ttcn3-hacks[master]: regen-makefile.sh: add link to related Debian bug in comment

2018-12-11 Thread Max
Max has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12239 )

Change subject: regen-makefile.sh: add link to related Debian bug in comment
..

regen-makefile.sh: add link to related Debian bug in comment

This makes it easier to track when this workaround can be disabled once
Debian/upstream (hopefully) resolve the issue.

Change-Id: I3c4ed0ae5c1145f162b2745f4a46705b51874b5b
---
M regen-makefile.sh
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Pau Espin Pedrol: Looks good to me, approved



diff --git a/regen-makefile.sh b/regen-makefile.sh
index b8be4ea..a9f8562 100755
--- a/regen-makefile.sh
+++ b/regen-makefile.sh
@@ -6,6 +6,8 @@
 # the binaries to different paths without patching the make file
 # generator, leading in inconsistent non-working Makefiles.
 #
+# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=884303 for details.
+#
 # The regexes below patch the generated Makefile to work on Debian 9 and
 # unstable, so far tested with TITAN 6.1.0, 6.2.0 and 6.3.0
 #

--
To view, visit https://gerrit.osmocom.org/12239
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I3c4ed0ae5c1145f162b2745f4a46705b51874b5b
Gerrit-Change-Number: 12239
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-sgsn[master]: remove pointless declaration of struct gsm_network

2018-12-11 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/12242 )

Change subject: remove pointless declaration of struct gsm_network
..


Patch Set 1: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/#/c/12242/1/src/gprs/sgsn_ctrl.c
File src/gprs/sgsn_ctrl.c:

https://gerrit.osmocom.org/#/c/12242/1/src/gprs/sgsn_ctrl.c@64
PS1, Line 64: struct ctrl_handle *sgsn_controlif_setup(void *data, const char 
*bind_addr, uint16_t port)
I think it's even more confusing this way. If parameter is unused than simply 
drop the parameter.



--
To view, visit https://gerrit.osmocom.org/12242
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib4151afa5bff01e63b462cca517fb60ac0503759
Gerrit-Change-Number: 12242
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Tue, 11 Dec 2018 15:32:59 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-sgsn[master]: make gsup ipa name configurable in osmo-sgsn.cfg

2018-12-11 Thread Stefan Sperling
Stefan Sperling has uploaded this change for review. ( 
https://gerrit.osmocom.org/12243


Change subject: make gsup ipa name configurable in osmo-sgsn.cfg
..

make gsup ipa name configurable in osmo-sgsn.cfg

Add a 'ipa-name' VTY command which overrides the default IPA
name used by the SGSN on the GSUP link towards the HLR.
This is required for GSUP routing in multi-SGSN networks.

Related: OS#3356

Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
---
M include/osmocom/sgsn/sgsn.h
M src/gprs/gprs_subscriber.c
M src/gprs/sgsn_vty.c
3 files changed, 30 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/43/12243/1

diff --git a/include/osmocom/sgsn/sgsn.h b/include/osmocom/sgsn/sgsn.h
index 3a34ff9..c80355d 100644
--- a/include/osmocom/sgsn/sgsn.h
+++ b/include/osmocom/sgsn/sgsn.h
@@ -124,6 +124,12 @@
enum ranap_nsap_addr_enc rab_assign_addr_enc;
} iu;
 #endif
+
+   /* This is transmitted as IPA Serial Number tag, which is used for GSUP 
routing (e.g. in OsmoHLR).
+* This name must be set in a multi-SGSN network, and it must be unique 
to each SGSN.
+* If no name is set, the IPA Serial Number will be the same as the 
Unit Name,
+* and will be of the form 'SGSN-00-00-00-00-00-00' */
+   char *sgsn_ipa_name;
 };

 struct sgsn_instance {
diff --git a/src/gprs/gprs_subscriber.c b/src/gprs/gprs_subscriber.c
index 4ab45c2..484c7ef 100644
--- a/src/gprs/gprs_subscriber.c
+++ b/src/gprs/gprs_subscriber.c
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -63,15 +64,20 @@
 int gprs_subscr_init(struct sgsn_instance *sgi)
 {
const char *addr_str;
+   struct ipaccess_unit *ipa_dev;

if (!sgi->cfg.gsup_server_addr.sin_addr.s_addr)
return 0;

addr_str = inet_ntoa(sgi->cfg.gsup_server_addr.sin_addr);

-   sgi->gsup_client = osmo_gsup_client_create(
+   ipa_dev = talloc_zero(sgi, struct ipaccess_unit);
+   ipa_dev->unit_name = "SGSN";
+   ipa_dev->serno = sgi->cfg.sgsn_ipa_name; /* NULL unless configured via 
VTY */
+
+   sgi->gsup_client = osmo_gsup_client_create2(
sgi,
-   "SGSN",
+   ipa_dev,
addr_str, sgi->cfg.gsup_server_port,
_read_cb,
>cfg.oap);
diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c
index 601b3c5..ebf77ba 100644
--- a/src/gprs/sgsn_vty.c
+++ b/src/gprs/sgsn_vty.c
@@ -177,6 +177,9 @@
vty_out(vty, " gtp local-ip %s%s",
inet_ntoa(g_cfg->gtp_listenaddr.sin_addr), VTY_NEWLINE);

+   if (g_cfg->sgsn_ipa_name)
+   vty_out(vty, " ipa-name %s%s", g_cfg->sgsn_ipa_name, 
VTY_NEWLINE);
+
llist_for_each_entry(gctx, _ggsn_ctxts, list) {
if (gctx->id == UINT32_MAX)
continue;
@@ -338,6 +341,18 @@
return CMD_SUCCESS;
 }

+DEFUN(cfg_sgsn_ipa_name,
+  cfg_sgsn_ipa_name_cmd,
+  "ipa-name NAME",
+  "Set the IPA name of this SGSN\n"
+  "A unique name for this SGSN. For example: PLMN + redundancy server 
number: SGSN-901-70-0. "
+  "This name is used for GSUP routing and must be set if more than one 
SGSN is connected to the network. "
+  "The default is 'SGSN-00-00-00-00-00-00'.\n")
+{
+   g_cfg->sgsn_ipa_name = talloc_strdup(tall_vty_ctx, argv[0]);
+   return CMD_SUCCESS;
+}
+
 #if 0
 DEFUN(cfg_ggsn_remote_port, cfg_ggsn_remote_port_cmd,
"ggsn <0-255> remote-port <0-65535>",
@@ -1358,6 +1373,7 @@
install_node(_node, config_write_sgsn);
install_element(SGSN_NODE, _sgsn_bind_addr_cmd);
install_element(SGSN_NODE, _ggsn_remote_ip_cmd);
+   install_element(SGSN_NODE, _sgsn_ipa_name_cmd);
//install_element(SGSN_NODE, _ggsn_remote_port_cmd);
install_element(SGSN_NODE, _ggsn_gtp_version_cmd);
install_element(SGSN_NODE, _ggsn_echo_interval_cmd);

--
To view, visit https://gerrit.osmocom.org/12243
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2f65fed9f56b9718e8a9647e3f01dce69870c1f
Gerrit-Change-Number: 12243
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling 


Change in osmo-sgsn[master]: remove pointless declaration of struct gsm_network

2018-12-11 Thread Stefan Sperling
Stefan Sperling has uploaded this change for review. ( 
https://gerrit.osmocom.org/12242


Change subject: remove pointless declaration of struct gsm_network
..

remove pointless declaration of struct gsm_network

Stop passing a NULL pointer of type struct gsm_network * to
ctrl_interface_setup_dynip(). A void pointer serves just fine
for this purpose, and also avoids the misconception that the
osmo-sgsn codebase was actually using struct gsm_network when,
in fact, this struct is not used anywhere in this code base.

Change-Id: Ib4151afa5bff01e63b462cca517fb60ac0503759
Related: OS#3356
---
M include/osmocom/sgsn/gprs_sgsn.h
M src/gprs/sgsn_ctrl.c
2 files changed, 3 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/42/12242/1

diff --git a/include/osmocom/sgsn/gprs_sgsn.h b/include/osmocom/sgsn/gprs_sgsn.h
index b6afe69..1740e1a 100644
--- a/include/osmocom/sgsn/gprs_sgsn.h
+++ b/include/osmocom/sgsn/gprs_sgsn.h
@@ -404,9 +404,7 @@
 /*
  * ctrl interface related work
  */
-struct gsm_network;
-struct ctrl_handle *sgsn_controlif_setup(struct gsm_network *,
-const char *bind_addr, uint16_t port);
+struct ctrl_handle *sgsn_controlif_setup(void *data, const char *bind_addr, 
uint16_t port);
 int sgsn_ctrl_cmds_install(void);

 /*
diff --git a/src/gprs/sgsn_ctrl.c b/src/gprs/sgsn_ctrl.c
index dc5ae79..22fbe7a 100644
--- a/src/gprs/sgsn_ctrl.c
+++ b/src/gprs/sgsn_ctrl.c
@@ -61,8 +61,7 @@
return rc;
 }
 
-struct ctrl_handle *sgsn_controlif_setup(struct gsm_network *net,
-const char *bind_addr, uint16_t port)
+struct ctrl_handle *sgsn_controlif_setup(void *data, const char *bind_addr, 
uint16_t port)
 {
-   return ctrl_interface_setup_dynip(net, bind_addr, port, NULL);
+   return ctrl_interface_setup_dynip(data, bind_addr, port, NULL);
 }

--
To view, visit https://gerrit.osmocom.org/12242
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib4151afa5bff01e63b462cca517fb60ac0503759
Gerrit-Change-Number: 12242
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling 


Change in osmo-ttcn3-hacks[master]: BSC_ConnectionHandler: introduce ctrl interface

2018-12-11 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/11697 )

Change subject: BSC_ConnectionHandler: introduce ctrl interface
..


Patch Set 9: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/11697
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie3caf7a449311e7687670cadfa27818635d25aa4
Gerrit-Change-Number: 11697
Gerrit-PatchSet: 9
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: dexter 
Gerrit-Comment-Date: Tue, 11 Dec 2018 14:03:26 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: MSC_Tests: remove unused control interface

2018-12-11 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/11690 )

Change subject: MSC_Tests: remove unused control interface
..


Patch Set 7: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/11690
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I204b2e96057d13342f4bd4fdaf08fb7b88b6b11d
Gerrit-Change-Number: 11690
Gerrit-PatchSet: 7
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: dexter 
Gerrit-Comment-Date: Tue, 11 Dec 2018 14:01:38 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmocore[master]: port rest octets encoding code from osmo-bsc

2018-12-11 Thread Stefan Sperling
Stefan Sperling has posted comments on this change. ( 
https://gerrit.osmocom.org/10189 )

Change subject: port rest octets encoding code from osmo-bsc
..


Patch Set 5:

Marking as WIP until we get a written statement by Jolly about the licence 
change.


--
To view, visit https://gerrit.osmocom.org/10189
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I47888965ab11bba1186c21987f1365c9270abeab
Gerrit-Change-Number: 10189
Gerrit-PatchSet: 5
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Stefan Sperling 
Gerrit-CC: Neels Hofmeyr 
Gerrit-Comment-Date: Tue, 11 Dec 2018 13:37:09 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in libosmocore[master]: port arfcn range encode support from osmo-bsc

2018-12-11 Thread Stefan Sperling
Stefan Sperling has posted comments on this change. ( 
https://gerrit.osmocom.org/10185 )

Change subject: port arfcn range encode support from osmo-bsc
..


Patch Set 7:

Marked as WIP until we get a written statement by Jolly about the licence 
change.


--
To view, visit https://gerrit.osmocom.org/10185
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia220764fba451be5e975ae7c5eefb1a25ac2bf2c
Gerrit-Change-Number: 10185
Gerrit-PatchSet: 7
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-CC: Holger Freyther 
Gerrit-Comment-Date: Tue, 11 Dec 2018 13:35:59 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-trx[master]: configure.ac: check boost only if USRP1 support is enabled

2018-12-11 Thread Neels Hofmeyr
Neels Hofmeyr has removed dexter from this change.  ( 
https://gerrit.osmocom.org/12088 )

Change subject: configure.ac: check boost only if USRP1 support is enabled
..


Removed reviewer dexter.
--
To view, visit https://gerrit.osmocom.org/12088
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: deleteReviewer
Gerrit-Change-Id: I4c3fa3ff58fd552d0cb4c4cf2033615d84c07c96
Gerrit-Change-Number: 12088
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Neels Hofmeyr 


Change in osmo-trx[master]: configure.ac: check boost only if USRP1 support is enabled

2018-12-11 Thread Neels Hofmeyr
Neels Hofmeyr has removed dexter from this change.  ( 
https://gerrit.osmocom.org/12088 )

Change subject: configure.ac: check boost only if USRP1 support is enabled
..


Removed reviewer dexter.
--
To view, visit https://gerrit.osmocom.org/12088
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: deleteReviewer
Gerrit-Change-Id: I4c3fa3ff58fd552d0cb4c4cf2033615d84c07c96
Gerrit-Change-Number: 12088
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Neels Hofmeyr 
Gerrit-CC: dexter 


Change in osmo-trx[master]: configure.ac: check boost only if USRP1 support is enabled

2018-12-11 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/12088 )

Change subject: configure.ac: check boost only if USRP1 support is enabled
..


Patch Set 1:

(sorry for the noise, trying to figure out a UI failure report)


--
To view, visit https://gerrit.osmocom.org/12088
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4c3fa3ff58fd552d0cb4c4cf2033615d84c07c96
Gerrit-Change-Number: 12088
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: dexter 
Gerrit-CC: Neels Hofmeyr 
Gerrit-CC: dexter 
Gerrit-Comment-Date: Tue, 11 Dec 2018 13:31:57 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-trx[master]: configure.ac: check boost only if USRP1 support is enabled

2018-12-11 Thread Neels Hofmeyr
Neels Hofmeyr has removed dexter from this change.  ( 
https://gerrit.osmocom.org/12088 )

Change subject: configure.ac: check boost only if USRP1 support is enabled
..


Removed reviewer dexter.
--
To view, visit https://gerrit.osmocom.org/12088
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: deleteReviewer
Gerrit-Change-Id: I4c3fa3ff58fd552d0cb4c4cf2033615d84c07c96
Gerrit-Change-Number: 12088
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Neels Hofmeyr 


Change in libosmocore[master]: port arfcn range encode support from osmo-bsc

2018-12-11 Thread Neels Hofmeyr
Neels Hofmeyr has removed dexter from this change.  ( 
https://gerrit.osmocom.org/10185 )

Change subject: port arfcn range encode support from osmo-bsc
..


Removed reviewer dexter.
--
To view, visit https://gerrit.osmocom.org/10185
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: deleteReviewer
Gerrit-Change-Id: Ia220764fba451be5e975ae7c5eefb1a25ac2bf2c
Gerrit-Change-Number: 10185
Gerrit-PatchSet: 7
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-CC: Holger Freyther 


Change in libosmocore[master]: port arfcn range encode support from osmo-bsc

2018-12-11 Thread Stefan Sperling
Stefan Sperling has posted comments on this change. ( 
https://gerrit.osmocom.org/10185 )

Change subject: port arfcn range encode support from osmo-bsc
..


Patch Set 7:

Please don't merge this yet. There has been no written statement by Jolly 
regarding the licence change yet.


--
To view, visit https://gerrit.osmocom.org/10185
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia220764fba451be5e975ae7c5eefb1a25ac2bf2c
Gerrit-Change-Number: 10185
Gerrit-PatchSet: 7
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-CC: Holger Freyther 
Gerrit-Comment-Date: Tue, 11 Dec 2018 13:27:22 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in libosmocore[master]: port arfcn range encode support from osmo-bsc

2018-12-11 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/10185 )

Change subject: port arfcn range encode support from osmo-bsc
..


Patch Set 7: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/10185
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia220764fba451be5e975ae7c5eefb1a25ac2bf2c
Gerrit-Change-Number: 10185
Gerrit-PatchSet: 7
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-CC: Holger Freyther 
Gerrit-Comment-Date: Tue, 11 Dec 2018 13:20:24 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmocore[master]: port arfcn range encode support from osmo-bsc

2018-12-11 Thread Stefan Sperling
Hello Max, Neels Hofmeyr, Harald Welte, Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/10185

to look at the new patch set (#7).

Change subject: port arfcn range encode support from osmo-bsc
..

port arfcn range encode support from osmo-bsc

As part of fixing issue OS#3075, we want to migrate support
for encoding system information from osmo-bsc to libosmocore.

This change ports one of the prerequisites for doing so:
osmo-bsc code for range-encoding ARFCNs, including tests.

An osmo_gsm48_ prefix has been prepended to public symbols in
order to avoid clashes with existing symbols in osmo-bsc code.

Change-Id: Ia220764fba451be5e975ae7c5eefb1a25ac2bf2c
Related: OS#3075
---
M include/Makefile.am
A include/osmocom/gsm/gsm48_arfcn_range_encode.h
M src/gsm/Makefile.am
A src/gsm/gsm48_arfcn_range_encode.c
M src/gsm/libosmogsm.map
M tests/gsm0408/gsm0408_test.c
M tests/gsm0408/gsm0408_test.ok
7 files changed, 761 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/85/10185/7
--
To view, visit https://gerrit.osmocom.org/10185
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia220764fba451be5e975ae7c5eefb1a25ac2bf2c
Gerrit-Change-Number: 10185
Gerrit-PatchSet: 7
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-CC: Holger Freyther 


Change in libosmocore[master]: port arfcn range encode support from osmo-bsc

2018-12-11 Thread Stefan Sperling
Stefan Sperling has posted comments on this change. ( 
https://gerrit.osmocom.org/10185 )

Change subject: port arfcn range encode support from osmo-bsc
..


Patch Set 6:

(3 comments)

https://gerrit.osmocom.org/#/c/10185/6/tests/gsm0408/gsm0408_test.c
File tests/gsm0408/gsm0408_test.c:

https://gerrit.osmocom.org/#/c/10185/6/tests/gsm0408/gsm0408_test.c@33
PS6, Line 33: #include 
> not needed
Right, dropped.


https://gerrit.osmocom.org/#/c/10185/6/tests/gsm0408/gsm0408_test.c@116
PS6, Line 116:  printf(" is: %s\n", osmo_hexdump(msg->data, 
msg->len));
> maybe a bit eager find-replace? I think this stderr output should also go to 
> stdout, yes, but techni […]
Oh, I understood that you wanted all fprintf() in this file to be printf() for 
some reason. Reverted in next patch set.


https://gerrit.osmocom.org/#/c/10185/6/tests/gsm0408/gsm0408_test.c@914
PS6, Line 914: };
> drop this too
Done.



--
To view, visit https://gerrit.osmocom.org/10185
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia220764fba451be5e975ae7c5eefb1a25ac2bf2c
Gerrit-Change-Number: 10185
Gerrit-PatchSet: 6
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-CC: Holger Freyther 
Gerrit-Comment-Date: Tue, 11 Dec 2018 13:17:21 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-ttcn3-hacks[master]: MGCP: remove commented variants

2018-12-11 Thread Max
Hello dexter, Pau Espin Pedrol, Neels Hofmeyr, Harald Welte, Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/12238

to look at the new patch set (#2).

Change subject: MGCP: remove commented variants
..

MGCP: remove commented variants

It's unclear why those variants were commented - looks like artifact
from initial development. Let's drop them to avoid confusion.

Change-Id: I3f11a93634fc50243a7210edcd501bd4b90d6dcd
---
M library/MGCP_Types.ttcn
1 file changed, 0 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/38/12238/2
--
To view, visit https://gerrit.osmocom.org/12238
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I3f11a93634fc50243a7210edcd501bd4b90d6dcd
Gerrit-Change-Number: 12238
Gerrit-PatchSet: 2
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: dexter 


Change in osmo-msc[master]: make gsup ipa name configurable in osmo-msc.cfg

2018-12-11 Thread Stefan Sperling
Stefan Sperling has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12177 )

Change subject: make gsup ipa name configurable in osmo-msc.cfg
..

make gsup ipa name configurable in osmo-msc.cfg

Add a 'ipa-name' VTY command which overrides the default IPA name
used by the MSC. This is a prerequisite for inter-MSC handover.

Related: OS#3355
Change-Id: I317d6c59f77e92fbb2b875a83dc0ec2fa5cb6006
---
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/vlr.h
M src/libmsc/gsm_04_08.c
M src/libmsc/msc_vty.c
M src/libvlr/vlr.c
M tests/msc_vlr/Makefile.am
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_hlr_reject.err
M tests/msc_vlr/msc_vlr_test_hlr_timeout.err
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
M tests/msc_vlr/msc_vlr_test_no_authen.err
M tests/msc_vlr/msc_vlr_test_reject_concurrency.err
M tests/msc_vlr/msc_vlr_test_rest.err
M tests/msc_vlr/msc_vlr_test_ss.err
M tests/msc_vlr/msc_vlr_test_umts_authen.err
M tests/msc_vlr/msc_vlr_tests.c
M tests/test_nodes.vty
20 files changed, 160 insertions(+), 129 deletions(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 63af3e7..d2511cb 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -212,6 +212,12 @@
/* MSISDN to which to route MO emergency calls */
char *route_to_msisdn;
} emergency;
+
+   /* This is transmitted as IPA Serial Number tag, which is used for GSUP 
routing (e.g. in OsmoHLR).
+ * For inter-MSC handover, the remote MSC's neighbor configuration 
requires to match this name.
+* If no name is set, the IPA Serial Number will be the same as the 
Unit Name,
+* and will be of the form 'MSC-00-00-00-00-00-00' */
+   char *msc_ipa_name;
 };

 struct osmo_esme;
diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h
index c0e4864..68e0759 100644
--- a/include/osmocom/msc/vlr.h
+++ b/include/osmocom/msc/vlr.h
@@ -9,6 +9,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -312,7 +313,7 @@
 int vlr_subscr_rx_imsi_detach(struct vlr_subscr *vsub);

 struct vlr_instance *vlr_alloc(void *ctx, const struct vlr_ops *ops);
-int vlr_start(const char *gsup_unit_name, struct vlr_instance *vlr,
+int vlr_start(struct ipaccess_unit *ipa_dev, struct vlr_instance *vlr,
  const char *gsup_server_addr_str, uint16_t gsup_server_port);

 /* internal use only */
diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c
index 95c3183..7fe2c50 100644
--- a/src/libmsc/gsm_04_08.c
+++ b/src/libmsc/gsm_04_08.c
@@ -1828,9 +1828,15 @@
 /* Launch the VLR, i.e. its GSUP connection */
 int msc_vlr_start(struct gsm_network *net)
 {
+   struct ipaccess_unit *ipa_dev;
+
OSMO_ASSERT(net->vlr);
-   return vlr_start("MSC", net->vlr, net->gsup_server_addr_str,
-net->gsup_server_port);
+
+   ipa_dev = talloc_zero(net->vlr, struct ipaccess_unit);
+   ipa_dev->unit_name = "MSC";
+   ipa_dev->serno = net->msc_ipa_name; /* NULL unless configured via VTY */
+
+   return vlr_start(ipa_dev, net->vlr, net->gsup_server_addr_str, 
net->gsup_server_port);
 }

 struct msgb *gsm48_create_mm_serv_rej(enum gsm48_reject_value value)
diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c
index e1d1b40..06e1139 100644
--- a/src/libmsc/msc_vty.c
+++ b/src/libmsc/msc_vty.c
@@ -458,6 +458,18 @@
return CMD_SUCCESS;
 }

+DEFUN(cfg_msc_ipa_name,
+  cfg_msc_ipa_name_cmd,
+  "ipa-name NAME",
+  "Set the IPA name of this MSC\n"
+  "A unique name for this MSC. For example: PLMN + redundancy server 
number: MSC-901-70-0. "
+  "This name is used for GSUP routing and must be set if more than one MSC 
is connected to the HLR. "
+  "The default is 'MSC-00-00-00-00-00-00'.\n")
+{
+   gsmnet->msc_ipa_name = talloc_strdup(gsmnet, argv[0]);
+   return CMD_SUCCESS;
+}
+
 static int config_write_msc(struct vty *vty)
 {
vty_out(vty, "msc%s", VTY_NEWLINE);
@@ -491,6 +503,9 @@
gsmnet->emergency.route_to_msisdn, VTY_NEWLINE);
}

+   if (gsmnet->msc_ipa_name)
+   vty_out(vty, " ipa-name %s%s", gsmnet->msc_ipa_name, 
VTY_NEWLINE);
+
mgcp_client_config_write(vty, " ");
 #ifdef BUILD_IU
ranap_iu_vty_config_write(vty, " ");
@@ -1483,6 +1498,7 @@
install_element(MSC_NODE, _msc_cs7_instance_iu_cmd);
install_element(MSC_NODE, _msc_paging_response_timer_cmd);
install_element(MSC_NODE, _msc_emergency_msisdn_cmd);
+   install_element(MSC_NODE, _msc_ipa_name_cmd);

mgcp_client_vty_init(msc_network, MSC_NODE, _network->mgw.conf);
 

Change in osmo-msc[master]: provide software version information to gsup peer

2018-12-11 Thread Stefan Sperling
Stefan Sperling has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12178 )

Change subject: provide software version information to gsup peer
..

provide software version information to gsup peer

Provide software version information to the GSUP peer. The version now
shows up in logs like this: Software_Version='osmo-msc-1.2.0.120-1263b'

Change-Id: I2eba32569349facdbb1fda201067c62cc804ccf4
Depends: I317d6c59f77e92fbb2b875a83dc0ec2fa5cb6006
Related: OS#3355
---
M src/libmsc/gsm_04_08.c
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Vadim Yanitskiy: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c
index 7fe2c50..dc0476b 100644
--- a/src/libmsc/gsm_04_08.c
+++ b/src/libmsc/gsm_04_08.c
@@ -1835,6 +1835,7 @@
ipa_dev = talloc_zero(net->vlr, struct ipaccess_unit);
ipa_dev->unit_name = "MSC";
ipa_dev->serno = net->msc_ipa_name; /* NULL unless configured via VTY */
+   ipa_dev->swversion = PACKAGE_NAME "-" PACKAGE_VERSION;

return vlr_start(ipa_dev, net->vlr, net->gsup_server_addr_str, 
net->gsup_server_port);
 }

--
To view, visit https://gerrit.osmocom.org/12178
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I2eba32569349facdbb1fda201067c62cc804ccf4
Gerrit-Change-Number: 12178
Gerrit-PatchSet: 10
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmo-ttcn3-hacks[master]: Remove -Wall for autogenerated code

2018-12-11 Thread Max
Max has uploaded this change for review. ( https://gerrit.osmocom.org/12241


Change subject: Remove -Wall for autogenerated code
..

Remove -Wall for autogenerated code

There seems to be no option for ttcn3_makefilegen to disable generated
code warnings so the only way to clear output from useless warnings
about indentation and such is to manually strip -Wall using sed.

Change-Id: I7ef141f7f3370a1bf909845ce8a4eb650b33fa81
---
M regen-makefile.sh
1 file changed, 3 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/41/12241/1

diff --git a/regen-makefile.sh b/regen-makefile.sh
index b8be4ea..eb9ecdc 100755
--- a/regen-makefile.sh
+++ b/regen-makefile.sh
@@ -31,6 +31,9 @@
 # see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879816 for details
 sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = 
-D$(PLATFORM) -DMAKEDEPEND_RUN -DUSE_SCTP -I$(TTCN3_DIR)\/include 
-I\/usr\/include\/titan/' Makefile

+#remove -Wall from CXXFLAGS: we're not interested in generic warnings for 
autogenerated code cluttering the logs
+sed -i -e 's/-Wall//' Makefile
+
 if [ "x$CPPFLAGS_TTCN3" != "x" ]; then
sed -i -e 's/CPPFLAGS_TTCN3 =/CPPFLAGS_TTCN3 = '"$CPPFLAGS_TTCN3"'/' 
Makefile
 fi

--
To view, visit https://gerrit.osmocom.org/12241
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ef141f7f3370a1bf909845ce8a4eb650b33fa81
Gerrit-Change-Number: 12241
Gerrit-PatchSet: 1
Gerrit-Owner: Max 


Change in libosmocore[master]: port arfcn range encode support from osmo-bsc

2018-12-11 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/10185 )

Change subject: port arfcn range encode support from osmo-bsc
..


Patch Set 6: Code-Review-1

(3 comments)

sorry, missed before: either not add the .err file, or if you want to add it 
(which would again be a separate patch though), then you also need to adjust 
libosmocore/tests/Makefile.am EXTRA_DIST to add it, and also adjust 
tests/testsuite.at so that the .err file gets validated.

https://gerrit.osmocom.org/#/c/10185/6/tests/gsm0408/gsm0408_test.c
File tests/gsm0408/gsm0408_test.c:

https://gerrit.osmocom.org/#/c/10185/6/tests/gsm0408/gsm0408_test.c@33
PS6, Line 33: #include 
not needed


https://gerrit.osmocom.org/#/c/10185/6/tests/gsm0408/gsm0408_test.c@116
PS6, Line 116:  printf(" is: %s\n", osmo_hexdump(msg->data, 
msg->len));
maybe a bit eager find-replace? I think this stderr output should also go to 
stdout, yes, but technically that's a separate patch. (This should never fire 
anyway as long as the test succeeds, that's why we never saw it.)


https://gerrit.osmocom.org/#/c/10185/6/tests/gsm0408/gsm0408_test.c@914
PS6, Line 914: };
drop this too



--
To view, visit https://gerrit.osmocom.org/10185
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia220764fba451be5e975ae7c5eefb1a25ac2bf2c
Gerrit-Change-Number: 10185
Gerrit-PatchSet: 6
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-CC: Holger Freyther 
Gerrit-Comment-Date: Tue, 11 Dec 2018 12:58:14 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: trigger acc ramping based on trx rf-locked state

2018-12-11 Thread Stefan Sperling
Stefan Sperling has posted comments on this change. ( 
https://gerrit.osmocom.org/7732 )

Change subject: trigger acc ramping based on trx rf-locked state
..


Patch Set 4:

(4 comments)

https://gerrit.osmocom.org/#/c/7732/1/src/libbsc/acc_ramp.c
File src/libbsc/acc_ramp.c:

https://gerrit.osmocom.org/#/c/7732/1/src/libbsc/acc_ramp.c@162
PS1, Line 162:
> You are deferring an expected nm_statechg_signal_data pointer before knowing 
> if that's the correct s […]
Nice catch! Fixed in next patch set.


https://gerrit.osmocom.org/#/c/7732/1/src/libbsc/acc_ramp.c@166
PS1, Line 166:  acc_ramp_trigger(acc_ramp);
> Is this really needed? we are only attaching the cb to the SS_NM subsystem 
> right? […]
Unsure. This was copied from bts_ipa_nm_sig_cb() in bts_ipaccess_nanobts.c. I 
didn't verify whether it's really required, and I'm happy to drop it (it 
certainly looks weird).


https://gerrit.osmocom.org/#/c/7732/1/src/libbsc/acc_ramp.c@194
PS1, Line 194:  acc_ramp->bts = bts;
> What about NM_STATE_SHUTDOWN and NM_STATE_NULL? Would be nice at least adding 
> an explicit case for N […]
I'll make it abort ramping on SHUTDOWN as well.
Not sure what to do about NULL -- for now I'd treat it as a no-op.

An ASSERT on default would be a very bad idea because the administrative state 
value isn't checked by the lower layers but simply read verbatim from the TLV 
provided in the received packet. So an assert would introduce an easy way to 
kill the process remotely. I would rather log a warning instead (see next patch 
set).


https://gerrit.osmocom.org/#/c/7732/1/src/libbsc/bsc_vty.c
File src/libbsc/bsc_vty.c:

https://gerrit.osmocom.org/#/c/7732/1/src/libbsc/bsc_vty.c@3280
PS1, Line 3280:
> You can take the chance to improve the "BTS reconnects" part by adding 
> reference to RSL link.
Yes this comment is a bit sparse. Improved in next patch set.



--
To view, visit https://gerrit.osmocom.org/7732
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4124f1da3dadec003de45c1da8435506ee8f0a34
Gerrit-Change-Number: 7732
Gerrit-PatchSet: 4
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Tue, 11 Dec 2018 12:57:04 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in libosmocore[master]: port rest octets encoding code from osmo-bsc

2018-12-11 Thread Stefan Sperling
Stefan Sperling has posted comments on this change. ( 
https://gerrit.osmocom.org/10189 )

Change subject: port rest octets encoding code from osmo-bsc
..


Patch Set 3:

> Patch Set 3:
>
> has anything changed about the licensing? no, right?

No change. I have just rebased the patches to resolve merge conflicts.


--
To view, visit https://gerrit.osmocom.org/10189
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I47888965ab11bba1186c21987f1365c9270abeab
Gerrit-Change-Number: 10189
Gerrit-PatchSet: 3
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Stefan Sperling 
Gerrit-CC: Neels Hofmeyr 
Gerrit-Comment-Date: Tue, 11 Dec 2018 12:53:55 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-msc[master]: make gsup ipa name configurable in osmo-msc.cfg

2018-12-11 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/12177 )

Change subject: make gsup ipa name configurable in osmo-msc.cfg
..


Patch Set 8: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/12177
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I317d6c59f77e92fbb2b875a83dc0ec2fa5cb6006
Gerrit-Change-Number: 12177
Gerrit-PatchSet: 8
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Tue, 11 Dec 2018 12:51:27 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


  1   2   >