Build failed in Jenkins: master-osmo-iuh » a1=default,a2=default,a3=default,osmocom-master-debian9 #2245

2018-10-16 Thread jenkins
See 


--
[...truncated 676.31 KB...]
  CC   PTMSIRAI.o
  CC   RAB-ID.o
  CC   RABList.o
  CC   RABListItem.o
  CC   RAC.o
  CC   RAI.o
  CC   Registration-Cause.o
  CC   RNC-ID.o
  CC   SAC.o
  CC   S-RNTIPrefix.o
  CC   TMSILAI.o
  CC   TMSIDS41.o
  CC   TransportInfo.o
  CC   TransportLayerAddress.o
  CC   Tunnel-Information.o
  CC   TypeOfError.o
  CC   UDP-Port-Number.o
  CC   UE-Capabilities.o
  CC   UTRANCellID.o
  CC   UE-Identity.o
  CC   Update-cause.o
  CC   URAIdentityList.o
  CC   URAIdentity.o
  CC   U-RNTI.o
  CC   UnknownU-RNTIIndication.o
  CC   HNBAP-PDU.o
  CC   InitiatingMessage.o
  CC   SuccessfulOutcome.o
  CC   UnsuccessfulOutcome.o
  CC   HNBRegisterRequest.o
  CC   HNBRegisterAccept.o
  CC   HNBRegisterReject.o
  CC   UERegisterRequest.o
  CC   UERegisterReject.o
  CC   UERegisterAccept.o
  CC   UEDe-Register.o
  CC   HNBDe-Register.o
  CC   CSGMembershipUpdate.o
  CC   TNLUpdateRequest.o
  CC   ErrorIndication.o
  CC   TNLUpdateResponse.o
  CC   TNLUpdateFailure.o
  CC   HNBConfigTransferRequest.o
  CC   HNBConfigTransferResponse.o
  CC   RelocationComplete.o
  CC   U-RNTIQueryRequest.o
  CC   U-RNTIQueryResponse.o
  CC   PrivateMessage.o
  CC   IE.o
  AR   libosmo-asn1-hnbap.a
ar: `u' modifier ignored since `D' is the default (see `U')
make[4]: Leaving directory 
'
Making all in rua
make[4]: Entering directory 
'
  CC   RUA_Criticality.o
  CC   RUA_Presence.o
  CC   RUA_ProcedureCode.o
  CC   RUA_PrivateIE-ID.o
  CC   RUA_TriggeringMessage.o
  CC   RUA_IE-Extensions.o
  CC   RUA_CN-DomainIndicator.o
  CC   RUA_ProtocolIE-ID.o
  CC   RUA_CSGMembershipStatus.o
  CC   RUA_Establishment-Cause.o
  CC   RUA_Context-ID.o
  CC   RUA_IntraDomainNasNodeSelector.o
  CC   RUA_Gsm-map-IDNNS.o
  CC   RUA_Ansi-41-IDNNS.o
  CC   RUA_RANAP-Message.o
  CC   RUA_RoutingParameter.o
  CC   RUA_Cause.o
  CC   RUA_CauseRadioNetwork.o
  CC   RUA_CauseTransport.o
  CC   RUA_CauseProtocol.o
  CC   RUA_CauseMisc.o
  CC   RUA_CriticalityDiagnostics.o
  CC   RUA_CriticalityDiagnostics-IE-List.o
  CC   RUA_TypeOfError.o
  CC   RUA_RUA-PDU.o
In file included from 
:8:0,
 from 
../../include/osmocom/rua/RUA_CriticalityDiagnostics-IE-List.h:14,
 from ../../include/osmocom/rua/RUA_CriticalityDiagnostics.h:17,
 from RUA_CriticalityDiagnostics.c:7:
../../include/osmocom/rua/RUA_CriticalityDiagnostics-IE-List.h:28:23: warning: 
‘struct Member’ declared inside parameter list will not be visible outside of 
this definition or declaration
  A_SEQUENCE_OF(struct Member {
   ^
:17:16:
 note: in definition of macro ‘A_SET_OF’
   void (*free)(type *);   \
^~~~
../../include/osmocom/rua/RUA_CriticalityDiagnostics-IE-List.h:28:2: note: in 
expansion of macro ‘A_SEQUENCE_OF’
  A_SEQUENCE_OF(struct Member {
  ^
In file included from 
:8:0,
 from 
../../include/osmocom/rua/RUA_CriticalityDiagnostics-IE-List.h:14,
 from RUA_CriticalityDiagnostics-IE-List.c:7:
../../include/osmocom/rua/RUA_CriticalityDiagnostics-IE-List.h:28:23: warning: 
‘struct Member’ declared inside parameter list will not be visible outside of 
this definition or declaration
  A_SEQUENCE_OF(struct Member {
   ^
:17:16:
 note: in definition of macro ‘A_SET_OF’
   void (*free)(type *);   \
^~~~
../../include/osmocom/rua/RUA_CriticalityDiagnostics-IE-List.h:28:2: note: in 
expansion of macro ‘A_SEQUENCE_OF’
  A_SEQUENCE_OF(struct Member {
  ^
  CC   

Change in osmo-mgw[master]: osmux: Avoid processing further frames if conn not found

2018-10-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11383 )

Change subject: osmux: Avoid processing further frames if conn not found
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I09190140ba917dfada4b0952230b68e0f5f6d43d
Gerrit-Change-Number: 11383
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Tue, 16 Oct 2018 20:45:00 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-mgw[master]: osmux: Move parse_cid of legacy dummy frames to own function

2018-10-16 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11378 )

Change subject: osmux: Move parse_cid of legacy dummy frames to own function
..

osmux: Move parse_cid of legacy dummy frames to own function

Backport from openbsc b010f869c915016b7fa97a26621582cd89de96b0.
Change-Id: I5766165985fbfcecc63d45b9e229322bc8cedf52
---
M src/libosmo-mgcp/mgcp_osmux.c
1 file changed, 15 insertions(+), 10 deletions(-)

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



diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index 2e6307e..9081873 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -316,6 +316,20 @@
return msg;
 }
 
+static int osmux_legacy_dummy_parse_cid(struct sockaddr_in *addr, struct msgb 
*msg,
+   uint8_t *osmux_cid)
+{
+   if (msg->len < 1 + sizeof(osmux_cid)) {
+   LOGP(DLMGCP, LOGL_ERROR,
+"Discarding truncated Osmux dummy load\n");
+   return -1;
+   }
+
+   /* extract the osmux CID from the dummy message */
+   memcpy(osmux_cid, >data[1], sizeof(*osmux_cid));
+   return 0;
+}
+
 #define osmux_chunk_length(msg, rem) (rem - msg->len);

 int osmux_read_from_bsc_nat_cb(struct osmo_fd *ofd, unsigned int what)
@@ -379,17 +393,8 @@
uint8_t osmux_cid;
struct mgcp_conn_rtp *conn_net = NULL;

-   if (msg->len < 1 + sizeof(osmux_cid)) {
-   LOGP(DLMGCP, LOGL_ERROR,
-"Discarding truncated Osmux dummy load\n");
+   if (osmux_legacy_dummy_parse_cid(addr, msg, _cid) < 0)
goto out;
-   }
-
-   LOGP(DLMGCP, LOGL_DEBUG, "Received Osmux dummy load from %s\n",
-inet_ntoa(addr->sin_addr));
-
-   /* extract the osmux CID from the dummy message */
-   memcpy(_cid, >data[1], sizeof(osmux_cid));

endp = endpoint_lookup(cfg, osmux_cid, >sin_addr, MGCP_DEST_BTS);
if (!endp) {

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

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


Change in osmo-mgw[master]: osmux: Improve checks around activating and using enabled osmux

2018-10-16 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11381 )

Change subject: osmux: Improve checks around activating and using enabled osmux
..

osmux: Improve checks around activating and using enabled osmux

* Refactor code to have unified checks on all paths activating Osmux.
* Improve checkings at activation time and add logging.
* Code now enforces endp osmux status to be enabled before processing
the frame through endp->osmux.out. Before, a delayed or bad pkt could
arrive and be processed by an endp with osmux not enabled, using
endp->osmux.out that was not initialized and ended up crashing:
libosmo-netif/src/osmux.c:281:3: runtime error: member access within null 
pointer of type 'struct msgb'

This could also happen if a BSC started sending or we received (non legacy 
dummy) osmux
frames before we received the BSC CRCX ACK agreeing on osmux negotiation
and switching to ACTIVATING state.

Related: SYS#4350

Port from openbsc 4a2cc9eb0a0f9424c16b26fcb757483a39d67482.
Includes fixup from openbsc I438349bffaa46a10ad8983090a4b17aed7e00d82.
Change-Id: Iac11e447ec0d76e4e74ec982a6e3f63b35548978
---
M src/libosmo-mgcp/mgcp_osmux.c
1 file changed, 43 insertions(+), 41 deletions(-)

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



diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index 2828d83..ca446ff 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -316,6 +316,34 @@
return msg;
 }

+/* Updates endp osmux state and returns 0 if it can process messages, -1 
otherwise */
+static int endp_osmux_state_check(struct mgcp_endpoint *endp, struct 
mgcp_conn_rtp *conn,
+ bool sending)
+{
+   switch(conn->osmux.state) {
+   case OSMUX_STATE_ACTIVATING:
+   if (osmux_enable_conn(endp, conn, >end.addr, 
htons(endp->cfg->osmux_port)) < 0) {
+   LOGP(DLMGCP, LOGL_ERROR,
+   "Could not enable osmux for conn:%s\n",
+   mgcp_conn_dump(conn->conn));
+   return -1;
+   }
+   LOGP(DLMGCP, LOGL_ERROR,
+   "Osmux CID %u for %s:%u is now enabled\n",
+   conn->osmux.cid, inet_ntoa(conn->end.addr),
+   endp->cfg->osmux_port);
+   return 0;
+   case OSMUX_STATE_ENABLED:
+   return 0;
+   default:
+   LOGP(DLMGCP, LOGL_ERROR,
+"Osmux %s in conn %s without full negotiation, state %d\n",
+sending ? "sent" : "received",
+mgcp_conn_dump(conn->conn), conn->osmux.state);
+   return -1;
+   }
+}
+
 static int osmux_legacy_dummy_parse_cid(struct sockaddr_in *addr, struct msgb 
*msg,
uint8_t *osmux_cid)
 {
@@ -374,11 +402,12 @@
 osmuxh->circuit_id);
goto out;
}
-   conn_bts->osmux.stats.octets += osmux_chunk_length(msg, rem);
-   conn_bts->osmux.stats.chunks++;
+   if (endp_osmux_state_check(endp, conn_bts, false) == 0) {
+   conn_bts->osmux.stats.octets += osmux_chunk_length(msg, 
rem);
+   conn_bts->osmux.stats.chunks++;
+   osmux_xfrm_output_sched(_bts->osmux.out, osmuxh);
+   }
rem = msg->len;
-
-   osmux_xfrm_output_sched(_bts->osmux.out, osmuxh);
}
 out:
msgb_free(msg);
@@ -408,19 +437,8 @@
if (!conn)
goto out;

-   if (conn->osmux.state == OSMUX_STATE_ENABLED)
-   goto out;
-
-   if (osmux_enable_conn(endp, conn, >sin_addr, addr->sin_port) < 0 
) {
-   LOGP(DLMGCP, LOGL_ERROR,
-"Could not enable osmux in endpoint 0x%x\n",
-ENDPOINT_NUMBER(endp));
-   goto out;
-   }
-
-   LOGP(DLMGCP, LOGL_INFO, "Enabling osmux in endpoint 0x%x for %s:%u\n",
-ENDPOINT_NUMBER(endp), inet_ntoa(addr->sin_addr),
-ntohs(addr->sin_port));
+   endp_osmux_state_check(endp, conn, false);
+   /* Only needed to punch hole in firewall, it can be dropped */
 out:
msgb_free(msg);
return 0;
@@ -468,11 +486,12 @@
 osmuxh->circuit_id);
goto out;
}
-   conn_net->osmux.stats.octets += osmux_chunk_length(msg, rem);
-   conn_net->osmux.stats.chunks++;
+   if (endp_osmux_state_check(endp, conn_net, false) == 0) {
+   conn_net->osmux.stats.octets += osmux_chunk_length(msg, 
rem);
+   conn_net->osmux.stats.chunks++;
+   osmux_xfrm_output_sched(_net->osmux.out, osmuxh);
+   

Change in osmo-mgw[master]: osmux_send_dummy: Avoid logging incorrectly and sending if osmux not ...

2018-10-16 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11376 )

Change subject: osmux_send_dummy: Avoid logging incorrectly and sending if 
osmux not enabled
..

osmux_send_dummy: Avoid logging incorrectly and sending if osmux not enabled

Port from openbsc 37a0307b6193c9b108cfd1aa2a88517a8b5cb907.
Change-Id: Iabc84cb482a425d4a6c2bb08c20b2e02a5a86b36
---
M src/libosmo-mgcp/mgcp_osmux.c
1 file changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index bc9eca2..2e58c55 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -641,12 +641,20 @@
LOGP(DLMGCP, LOGL_ERROR,
 "Could not activate osmux for conn:%s\n",
 mgcp_conn_dump(conn->conn));
+   return 0;
}
LOGP(DLMGCP, LOGL_ERROR,
 "Osmux CID %u for %s:%u is now enabled\n",
 conn->osmux.cid, inet_ntoa(conn->end.addr),
 endp->cfg->osmux_port);
}
+   if(conn->osmux.state != OSMUX_STATE_ENABLED) {
+   LOGP(DLMGCP, LOGL_ERROR,
+"OSMUX dummy to %s CID %u: Osmux not enabled on endpoint 
0x%x state %d\n",
+inet_ntoa(conn->end.addr), conn->osmux.cid,
+ENDPOINT_NUMBER(endp), conn->osmux.state);
+return 0;
+   }
LOGP(DLMGCP, LOGL_DEBUG,
 "sending OSMUX dummy load to %s CID %u\n",
 inet_ntoa(conn->end.addr), conn->osmux.cid);

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

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


Change in osmo-mgw[master]: osmux: allow enabling osmux only on correct activating state

2018-10-16 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11380 )

Change subject: osmux: allow enabling osmux only on correct activating state
..

osmux: allow enabling osmux only on correct activating state

State ACTIVATING is set once negotiation between the 2 parts went
successfuly.

Port from openbsc 96bd7b075a59eb051079152241b127ca944b0781.
Change-Id: Ic56eda1251be41369d869e687a1cf955df2c6d61
---
M src/libosmo-mgcp/mgcp_osmux.c
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index 38cd3bd..2828d83 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -536,9 +536,9 @@
uint16_t osmux_dummy = endp->cfg->osmux_dummy;

/* Check if osmux is enabled for the specified connection */
-   if (conn->osmux.state == OSMUX_STATE_DISABLED) {
-   LOGP(DLMGCP, LOGL_ERROR, "OSMUX not enabled for conn:%s\n",
-mgcp_conn_dump(conn->conn));
+   if (conn->osmux.state != OSMUX_STATE_ACTIVATING) {
+   LOGP(DLMGCP, LOGL_ERROR, "conn:%s didn't negotiate Osmux, state 
%d\n",
+mgcp_conn_dump(conn->conn), conn->osmux.state);
return -1;
}


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

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


Change in osmo-mgw[master]: mgcp: Log endpoint nr consistently as hex

2018-10-16 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11375 )

Change subject: mgcp: Log endpoint nr consistently as hex
..

mgcp: Log endpoint nr consistently as hex

Port from openbsc 078905a0603c91b227854abfa01c9e24143e39a1.
Change-Id: Idcb40e6fd561b24e111afe7463f44c43c530fac5
---
M src/libosmo-mgcp/mgcp_osmux.c
M src/libosmo-mgcp/mgcp_protocol.c
M tests/mgcp/mgcp_test.c
3 files changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index 9ae82cd..bc9eca2 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -407,12 +407,12 @@

if (osmux_enable_conn(endp, conn_net, >sin_addr, addr->sin_port) 
< 0 ) {
LOGP(DLMGCP, LOGL_ERROR,
-"Could not enable osmux in endpoint %d\n",
+"Could not enable osmux in endpoint 0x%x\n",
 ENDPOINT_NUMBER(endp));
goto out;
}

-   LOGP(DLMGCP, LOGL_INFO, "Enabling osmux in endpoint %d for %s:%u\n",
+   LOGP(DLMGCP, LOGL_INFO, "Enabling osmux in endpoint 0x%x for %s:%u\n",
 ENDPOINT_NUMBER(endp), inet_ntoa(addr->sin_addr),
 ntohs(addr->sin_port));
 out:
diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c
index bc191b5..e17bdae 100644
--- a/src/libosmo-mgcp/mgcp_protocol.c
+++ b/src/libosmo-mgcp/mgcp_protocol.c
@@ -691,7 +691,7 @@
if (!strcmp(token, "C"))
endp->x_osmo_ign |= MGCP_X_OSMO_IGN_CALLID;
else
-   LOGP(DLMGCP, LOGL_ERROR, "endpoint %x: received unknown 
X-Osmo-IGN item '%s'\n",
+   LOGP(DLMGCP, LOGL_ERROR, "endpoint 0x%x: received 
unknown X-Osmo-IGN item '%s'\n",
 ENDPOINT_NUMBER(endp), token);
}

diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c
index 4cb16dd..a540056 100644
--- a/tests/mgcp/mgcp_test.c
+++ b/tests/mgcp/mgcp_test.c
@@ -550,7 +550,7 @@
 static int mgcp_test_policy_cb(struct mgcp_trunk_config *cfg, int endpoint,
   int state, const char *transactio_id)
 {
-   fprintf(stderr, "Policy CB got state %d on endpoint %d\n",
+   fprintf(stderr, "Policy CB got state %d on endpoint 0x%x\n",
state, endpoint);
last_endpoint = endpoint;
return MGCP_POLICY_CONT;
@@ -813,7 +813,7 @@
OSMO_ASSERT(last_endpoint != -1);
endp = >trunk.endpoints[last_endpoint];

-   fprintf(stderr, "endpoint %d: "
+   fprintf(stderr, "endpoint 0x%x: "
"payload type %d (expected %d)\n",
last_endpoint,
conn->end.codec->payload_type, t->ptype);

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

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


Change in osmo-mgw[master]: osmux: Don't process regular osmux frames if disabled by cfg

2018-10-16 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11377 )

Change subject: osmux: Don't process regular osmux frames if disabled by cfg
..

osmux: Don't process regular osmux frames if disabled by cfg

Prior to this commit, the check was only done on legacy dummy frames.

Port from openbsc a42d4584fd01c9cd1021fab609bdaaafe859c13a.
Change-Id: I5b6606d72a9f5ae593a8e3ab5fbbe7e1e5a0ae11
---
M src/libosmo-mgcp/mgcp_osmux.c
1 file changed, 12 insertions(+), 6 deletions(-)

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



diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index 2e58c55..2e6307e 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -331,6 +331,12 @@
if (!msg)
return -1;

+   if (!cfg->osmux) {
+   LOGP(DLMGCP, LOGL_ERROR,
+"bsc-nat wants to use Osmux but bsc did not request it\n");
+   goto out;
+   }
+
/* not any further processing dummy messages */
if (msg->data[0] == MGCP_DUMMY_LOAD)
goto out;
@@ -382,12 +388,6 @@
LOGP(DLMGCP, LOGL_DEBUG, "Received Osmux dummy load from %s\n",
 inet_ntoa(addr->sin_addr));

-   if (!cfg->osmux) {
-   LOGP(DLMGCP, LOGL_ERROR,
-"bsc wants to use Osmux but bsc-nat did not request it\n");
-   goto out;
-   }
-
/* extract the osmux CID from the dummy message */
memcpy(_cid, >data[1], sizeof(osmux_cid));

@@ -433,6 +433,12 @@
if (!msg)
return -1;

+   if (!cfg->osmux) {
+   LOGP(DLMGCP, LOGL_ERROR,
+"bsc wants to use Osmux but bsc-nat did not request it\n");
+   goto out;
+   }
+
/* not any further processing dummy messages */
if (msg->data[0] == MGCP_DUMMY_LOAD)
return osmux_handle_dummy(cfg, , msg);

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

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


Change in osmo-mgw[master]: osmux.h: Document enum osmux_state

2018-10-16 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11382 )

Change subject: osmux.h: Document enum osmux_state
..

osmux.h: Document enum osmux_state

Port for openbsc 9ae32d0d0607f270f20239b8104e09ec20352301.
Change-Id: I28978fa505d259f144457f29af4ba615aeaac74c
---
M include/osmocom/mgcp/osmux.h
1 file changed, 4 insertions(+), 5 deletions(-)

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



diff --git a/include/osmocom/mgcp/osmux.h b/include/osmocom/mgcp/osmux.h
index ea849c8..685be9c 100644
--- a/include/osmocom/mgcp/osmux.h
+++ b/include/osmocom/mgcp/osmux.h
@@ -24,10 +24,10 @@
 int osmux_used_cid(void);

 enum osmux_state {
-   OSMUX_STATE_DISABLED = 0,
-   OSMUX_STATE_NEGOTIATING,
-   OSMUX_STATE_ACTIVATING,
-   OSMUX_STATE_ENABLED,
+   OSMUX_STATE_DISABLED = 0, /* Osmux not being currently used by endp */
+   OSMUX_STATE_NEGOTIATING,  /* Osmux was locally requested in MGCP CRCX */
+   OSMUX_STATE_ACTIVATING,   /* Osmux was accepted in MGCP CRCX ACK. It 
can now be enabled by \ref osmux_enable_endpoint. */
+   OSMUX_STATE_ENABLED,  /* Osmux was initialized by \ref 
osmux_enable_endpoint and can process frames */
 };

 enum osmux_usage {
@@ -35,4 +35,3 @@
OSMUX_USAGE_ON = 1,
OSMUX_USAGE_ONLY = 2,
 };
-

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

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


Change in osmo-mgw[master]: osmux: Avoid processing further frames if conn not found

2018-10-16 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11383 )

Change subject: osmux: Avoid processing further frames if conn not found
..

osmux: Avoid processing further frames if conn not found

Other frames can come from known connections, so let's keep processing
each of them.

Change-Id: I09190140ba917dfada4b0952230b68e0f5f6d43d
---
M src/libosmo-mgcp/mgcp_osmux.c
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index ca446ff..a2c138d 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -394,7 +394,7 @@
/* FIXME: Get rid of CONN_ID_XXX! */
conn_bts = mgcp_conn_get_rtp(endp, CONN_ID_BTS);
if (!conn_bts)
-   goto out;
+   continue;

if (!endp) {
LOGP(DLMGCP, LOGL_ERROR,
@@ -478,7 +478,7 @@
/* FIXME: Get rid of CONN_ID_XXX! */
conn_net = mgcp_conn_get_rtp(endp, CONN_ID_NET);
if (!conn_net)
-   goto out;
+   continue;

if (!endp) {
LOGP(DLMGCP, LOGL_ERROR,

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

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


Change in osmo-mgw[master]: osmux: Don't process regular osmux frames if disabled by cfg

2018-10-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11377 )

Change subject: osmux: Don't process regular osmux frames if disabled by cfg
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5b6606d72a9f5ae593a8e3ab5fbbe7e1e5a0ae11
Gerrit-Change-Number: 11377
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Tue, 16 Oct 2018 20:45:10 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-mgw[master]: osmux: Make func handling dummy frames independent of endp type

2018-10-16 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11379 )

Change subject: osmux: Make func handling dummy frames independent of endp type
..

osmux: Make func handling dummy frames independent of endp type

Port from openbsc 8f321179747f64819d940d72d0212192f69284ca.
Change-Id: I3e16217737fd5ffb95c166c5f7344492cb6a6263
---
M src/libosmo-mgcp/mgcp_osmux.c
1 file changed, 9 insertions(+), 8 deletions(-)

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



diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index 9081873..38cd3bd 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -387,30 +387,31 @@

 /* This is called from the bsc-nat */
 static int osmux_handle_dummy(struct mgcp_config *cfg, struct sockaddr_in 
*addr,
- struct msgb *msg)
+ struct msgb *msg, int endp_type)
 {
struct mgcp_endpoint *endp;
uint8_t osmux_cid;
-   struct mgcp_conn_rtp *conn_net = NULL;
+   struct mgcp_conn_rtp *conn = NULL;

if (osmux_legacy_dummy_parse_cid(addr, msg, _cid) < 0)
goto out;

-   endp = endpoint_lookup(cfg, osmux_cid, >sin_addr, MGCP_DEST_BTS);
+   endp = endpoint_lookup(cfg, osmux_cid, >sin_addr, endp_type);
if (!endp) {
LOGP(DLMGCP, LOGL_ERROR,
 "Cannot find endpoint for Osmux CID %d\n", osmux_cid);
goto out;
}

-   conn_net = mgcp_conn_get_rtp(endp, CONN_ID_NET);
-   if (!conn_net)
+   /* FIXME: Get rid of CONN_ID_XXX! */
+   conn = mgcp_conn_get_rtp(endp, endp_type == MGCP_DEST_BTS ? CONN_ID_NET 
: CONN_ID_BTS);
+   if (!conn)
goto out;
 
-   if (conn_net->osmux.state == OSMUX_STATE_ENABLED)
+   if (conn->osmux.state == OSMUX_STATE_ENABLED)
goto out;

-   if (osmux_enable_conn(endp, conn_net, >sin_addr, addr->sin_port) 
< 0 ) {
+   if (osmux_enable_conn(endp, conn, >sin_addr, addr->sin_port) < 0 
) {
LOGP(DLMGCP, LOGL_ERROR,
 "Could not enable osmux in endpoint 0x%x\n",
 ENDPOINT_NUMBER(endp));
@@ -446,7 +447,7 @@

/* not any further processing dummy messages */
if (msg->data[0] == MGCP_DUMMY_LOAD)
-   return osmux_handle_dummy(cfg, , msg);
+   return osmux_handle_dummy(cfg, , msg, MGCP_DEST_BTS);

rem = msg->len;
while((osmuxh = osmux_xfrm_output_pull(msg)) != NULL) {

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

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


Change in osmo-mgw[master]: osmux: Improve checks around activating and using enabled osmux

2018-10-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11381 )

Change subject: osmux: Improve checks around activating and using enabled osmux
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iac11e447ec0d76e4e74ec982a6e3f63b35548978
Gerrit-Change-Number: 11381
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Tue, 16 Oct 2018 20:44:51 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-mgw[master]: osmux: allow enabling osmux only on correct activating state

2018-10-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11380 )

Change subject: osmux: allow enabling osmux only on correct activating state
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic56eda1251be41369d869e687a1cf955df2c6d61
Gerrit-Change-Number: 11380
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Tue, 16 Oct 2018 20:44:47 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-mgw[master]: osmux.h: Document enum osmux_state

2018-10-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11382 )

Change subject: osmux.h: Document enum osmux_state
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I28978fa505d259f144457f29af4ba615aeaac74c
Gerrit-Change-Number: 11382
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Tue, 16 Oct 2018 20:44:54 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-mgw[master]: osmux: Make func handling dummy frames independent of endp type

2018-10-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11379 )

Change subject: osmux: Make func handling dummy frames independent of endp type
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3e16217737fd5ffb95c166c5f7344492cb6a6263
Gerrit-Change-Number: 11379
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Tue, 16 Oct 2018 20:44:38 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-mgw[master]: osmux: Move parse_cid of legacy dummy frames to own function

2018-10-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11378 )

Change subject: osmux: Move parse_cid of legacy dummy frames to own function
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5766165985fbfcecc63d45b9e229322bc8cedf52
Gerrit-Change-Number: 11378
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Tue, 16 Oct 2018 20:44:28 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-mgw[master]: osmux_send_dummy: Avoid logging incorrectly and sending if osmux not ...

2018-10-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11376 )

Change subject: osmux_send_dummy: Avoid logging incorrectly and sending if 
osmux not enabled
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iabc84cb482a425d4a6c2bb08c20b2e02a5a86b36
Gerrit-Change-Number: 11376
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Tue, 16 Oct 2018 20:43:50 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-mgw[master]: mgcp: Log endpoint nr consistently as hex

2018-10-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11375 )

Change subject: mgcp: Log endpoint nr consistently as hex
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idcb40e6fd561b24e111afe7463f44c43c530fac5
Gerrit-Change-Number: 11375
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Tue, 16 Oct 2018 20:43:37 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-mgw[master]: osmux: Avoid initing output without enabling osmux

2018-10-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11374 )

Change subject: osmux: Avoid initing output without enabling osmux
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0a334842463d311bc80a980e60fb702a0a9ad610
Gerrit-Change-Number: 11374
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Tue, 16 Oct 2018 20:42:30 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in openbsc[master]: mgcp: osmux_send_dummy: Fix return without value

2018-10-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11372 )

Change subject: mgcp: osmux_send_dummy: Fix return without value
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I438349bffaa46a10ad8983090a4b17aed7e00d82
Gerrit-Change-Number: 11372
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Tue, 16 Oct 2018 20:41:46 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in openbsc[master]: mgcp: osmux_send_dummy: Fix return without value

2018-10-16 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11372 )

Change subject: mgcp: osmux_send_dummy: Fix return without value
..

mgcp: osmux_send_dummy: Fix return without value

Not really critical since only user of this function doesn't check the
return value.

Fixes commit: 4a2cc9eb0a0f9424c16b26fcb757483a39d67482
Change-Id: I438349bffaa46a10ad8983090a4b17aed7e00d82
---
M openbsc/src/libmgcp/mgcp_osmux.c
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/openbsc/src/libmgcp/mgcp_osmux.c b/openbsc/src/libmgcp/mgcp_osmux.c
index a0ac295..ce344ca 100644
--- a/openbsc/src/libmgcp/mgcp_osmux.c
+++ b/openbsc/src/libmgcp/mgcp_osmux.c
@@ -554,7 +554,7 @@
return 0;

if (endp_osmux_state_check(endp, >net_end.addr, true) < 0)
-   return;
+   return 0;

LOGP(DMGCP, LOGL_DEBUG,
 "sending OSMUX dummy load to %s CID %u\n",

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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I438349bffaa46a10ad8983090a4b17aed7e00d82
Gerrit-Change-Number: 11372
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-bsc[master]: gsm_08_08: do not include zero length speech codec list.

2018-10-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11388 )

Change subject: gsm_08_08: do not include zero length speech codec list.
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/11388
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: I07339322a71376e986a2d75b7bc1f552eafd02b5
Gerrit-Change-Number: 11388
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Tue, 16 Oct 2018 20:40:34 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: gsm_08_08: allow zero length speech codec lists in compl l3 info.

2018-10-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11387 )

Change subject: gsm_08_08: allow zero length speech codec lists in compl l3 
info.
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/11387
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: Id7332e5273ff0efb85043dd1e1bb804cfe2db944
Gerrit-Change-Number: 11387
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Tue, 16 Oct 2018 20:03:04 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: bssap: check for zero length speech codec lists.

2018-10-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11386 )

Change subject: bssap: check for zero length speech codec lists.
..


Patch Set 1:

(1 comment)

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

https://gerrit.osmocom.org/#/c/11386/1/src/osmo-bsc/osmo_bsc_bssap.c@700
PS1, Line 700:  if (conn->codec_list.len <= 0) {
> This check is already done in line 708, and IMHO cause is better set there. 
> […]
the difference is that the check here only applies *if* a SCL IE is actually 
present.  So we fail/reject if an IE is present, but it is of zero length.  
where the "line 708" catches even situations where the IE wouldn't be preseng, 
but only if aoip is enabled?  But then, how can we check for the length of an 
IE if it had never occurred?  This looks a bit fishy?



--
To view, visit https://gerrit.osmocom.org/11386
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: I2aca205dfdf5c7de7cb48ea2b57eb54e678e12fc
Gerrit-Change-Number: 11386
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Tue, 16 Oct 2018 20:02:11 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in docker-playground[master]: symlinks: nplab-m3ua-test, nplab-sua-test

2018-10-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11368 )

Change subject: symlinks: nplab-m3ua-test, nplab-sua-test
..


Patch Set 3:

you can simply rename/move them.


--
To view, visit https://gerrit.osmocom.org/11368
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: Iedf9a8cd9af1da674e018a08a977490520e602de
Gerrit-Change-Number: 11368
Gerrit-PatchSet: 3
Gerrit-Owner: osmith 
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Tue, 16 Oct 2018 19:57:14 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in docker-playground[master]: Remove top-level Makefile

2018-10-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11369 )

Change subject: Remove top-level Makefile
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/11369
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: Id18a9a7a70f85127e6f6c9447d71764018bdb4ff
Gerrit-Change-Number: 11369
Gerrit-PatchSet: 3
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: osmith 
Gerrit-CC: Neels Hofmeyr 
Gerrit-Comment-Date: Tue, 16 Oct 2018 19:57:50 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in docker-playground[master]: jenkins.sh: IMAGE_SUFFIX, docker_images_require()

2018-10-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11366 )

Change subject: jenkins.sh: IMAGE_SUFFIX, docker_images_require()
..


Patch Set 3: Code-Review+2

nice!


--
To view, visit https://gerrit.osmocom.org/11366
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: Idbb708ab16cb71bab5069127945b63388222369e
Gerrit-Change-Number: 11366
Gerrit-PatchSet: 3
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: osmith 
Gerrit-CC: Neels Hofmeyr 
Gerrit-Comment-Date: Tue, 16 Oct 2018 19:55:49 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: gsm_08_08: do not include zero length speech codec list.

2018-10-16 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/11388 )

Change subject: gsm_08_08: do not include zero length speech codec list.
..


Patch Set 1:

I am not sure we want to merge this patch. Why do you think having no speech 
codec elements in list means "user plane interface is not supported"? It can 
still support it but be misconfigured or on purpose configured to have no 
codecs available?


--
To view, visit https://gerrit.osmocom.org/11388
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: I07339322a71376e986a2d75b7bc1f552eafd02b5
Gerrit-Change-Number: 11388
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Tue, 16 Oct 2018 15:48:29 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-bsc[master]: gsm_08_08: allow zero length speech codec lists in compl l3 info.

2018-10-16 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/11387 )

Change subject: gsm_08_08: allow zero length speech codec lists in compl l3 
info.
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/11387
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: Id7332e5273ff0efb85043dd1e1bb804cfe2db944
Gerrit-Change-Number: 11387
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Tue, 16 Oct 2018 15:46:45 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: bssap: check for zero length speech codec lists.

2018-10-16 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/11386 )

Change subject: bssap: check for zero length speech codec lists.
..


Patch Set 1:

(1 comment)

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

https://gerrit.osmocom.org/#/c/11386/1/src/osmo-bsc/osmo_bsc_bssap.c@700
PS1, Line 700:  if (conn->codec_list.len <= 0) {
This check is already done in line 708, and IMHO cause is better set there. I 
think we can drop this addition here.



--
To view, visit https://gerrit.osmocom.org/11386
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: I2aca205dfdf5c7de7cb48ea2b57eb54e678e12fc
Gerrit-Change-Number: 11386
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Tue, 16 Oct 2018 15:46:05 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-dev[master]: 3G+2G.deps: add osmo-trx

2018-10-16 Thread osmith
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/11389


Change subject: 3G+2G.deps: add osmo-trx
..

3G+2G.deps: add osmo-trx

Change-Id: Ia4ebf2732694cee0600b602b82c660cf6278958d
---
M 3G+2G.deps
1 file changed, 1 insertion(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/89/11389/1

diff --git a/3G+2G.deps b/3G+2G.deps
index 5a17146..0eea175 100644
--- a/3G+2G.deps
+++ b/3G+2G.deps
@@ -13,3 +13,4 @@
 osmo-bsc   libosmo-sccp osmo-mgw
 osmo-sgsn  osmo-iuh osmo-ggsn
 osmo-sip-connector libosmocore
+osmo-trx   libosmocore

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

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia4ebf2732694cee0600b602b82c660cf6278958d
Gerrit-Change-Number: 11389
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 


Change in osmo-bsc[master]: bssap: check for zero length speech codec lists.

2018-10-16 Thread dexter
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/11386


Change subject: bssap: check for zero length speech codec lists.
..

bssap: check for zero length speech codec lists.

The specification implicitly allows speech codec lists with 0 elements.
When a speech codec list is included in the message, we should check if
it actually contains speech codec elements.

- Reject speech codec lists that do contain 0 elements

Change-Id: I2aca205dfdf5c7de7cb48ea2b57eb54e678e12fc
Related: OS#3657
---
M src/osmo-bsc/osmo_bsc_bssap.c
1 file changed, 7 insertions(+), 0 deletions(-)



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

diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index 537b851..282f1c5 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -696,6 +696,13 @@
cause = GSM0808_CAUSE_INCORRECT_VALUE;
goto reject;
}
+
+   if (conn->codec_list.len <= 0) {
+   LOGP(DMSC, LOGL_ERROR, "Speech codec list does 
not contain any codecs\n");
+   cause = GSM0808_CAUSE_INCORRECT_VALUE;
+   goto reject;
+   }
+
}

if (aoip && !conn->codec_list.len) {

--
To view, visit https://gerrit.osmocom.org/11386
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: I2aca205dfdf5c7de7cb48ea2b57eb54e678e12fc
Gerrit-Change-Number: 11386
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 


Change in osmo-bsc[master]: gsm_08_08: do not include zero length speech codec list.

2018-10-16 Thread dexter
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/11388


Change subject: gsm_08_08: do not include zero length speech codec list.
..

gsm_08_08: do not include zero length speech codec list.

When COMPLETE LAYER 3 INFORMATION is generated, it may include a speech
codec list that contains 0 elements (which is legal). The specification
requires the speech to be include if the network supports an IP based
user plane interface. It could be argumented that if no codecs are
available, the ip based user plane interface is not supported and
therefore the spec does not require the speech codec list IE to be
included for those cases. Lets check if the speech codec list has 0
elements and if its zero length, lets omit it completely.

- check for zero length speech codec list.
- omit speech codec list if it has zero elements

Change-Id: I07339322a71376e986a2d75b7bc1f552eafd02b5
Related: OS#3657
---
M src/osmo-bsc/gsm_08_08.c
1 file changed, 11 insertions(+), 1 deletion(-)



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

diff --git a/src/osmo-bsc/gsm_08_08.c b/src/osmo-bsc/gsm_08_08.c
index 807eb8c..19c2598 100644
--- a/src/osmo-bsc/gsm_08_08.c
+++ b/src/osmo-bsc/gsm_08_08.c
@@ -495,7 +495,17 @@

if (gscon_is_aoip(conn)) {
gen_bss_supported_codec_list(, msc, conn_get_bts(conn));
-   resp = gsm0808_create_layer3_2(msg, cgi_for_msc(conn->sccp.msc, 
conn_get_bts(conn)), );
+   if (scl.len > 0)
+   resp = gsm0808_create_layer3_2(msg, 
cgi_for_msc(conn->sccp.msc, conn_get_bts(conn)), );
+   else {
+   /* Note: 3GPP TS 48.008 3.2.1.32, COMPLETE LAYER 3 
INFORMATION clearly states that
+* Codec List (BSS Supported) shall be included, if the 
radio access network
+* supports an IP based user plane interface. It may be 
intentional that the
+* current configuration does not support any voice 
codecs, in those cases the
+* network does not support an IP based user plane 
interface, and therefore the
+* Codec List (BSS Supported) IE can be left out in 
those situations. */
+   resp = gsm0808_create_layer3_2(msg, 
cgi_for_msc(conn->sccp.msc, conn_get_bts(conn)), NULL);
+   }
} else
resp = gsm0808_create_layer3_2(msg, cgi_for_msc(conn->sccp.msc, 
conn_get_bts(conn)), NULL);


--
To view, visit https://gerrit.osmocom.org/11388
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: I07339322a71376e986a2d75b7bc1f552eafd02b5
Gerrit-Change-Number: 11388
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 


Change in osmo-bsc[master]: gsm_08_08: allow zero length speech codec lists in compl l3 info.

2018-10-16 Thread dexter
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/11387


Change subject: gsm_08_08: allow zero length speech codec lists in compl l3 
info.
..

gsm_08_08: allow zero length speech codec lists in compl l3 info.

The COMPLETE LAYER 3 INFORMATION message contains a an Codec List (BSS
Supported). When generating the compl l3 info msg, we check if the
speech codec list that we have generated before has at least one
element. If it has 0 elements we abort immediately. However, speech
codec lists with 0 elements are permitted by the spec, so we should
remove the checks as there are corner cases where voice support is
intentionally unavailable.

- Remove check for zero length speech codec lists.

Change-Id: Id7332e5273ff0efb85043dd1e1bb804cfe2db944
Depends: libosmocore I1eb1f4466b98bdd26d765b0e4cc690b5e89e9dd6
Related: OS#3657
---
M src/osmo-bsc/gsm_08_08.c
1 file changed, 1 insertion(+), 6 deletions(-)



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

diff --git a/src/osmo-bsc/gsm_08_08.c b/src/osmo-bsc/gsm_08_08.c
index 6e1e502..807eb8c 100644
--- a/src/osmo-bsc/gsm_08_08.c
+++ b/src/osmo-bsc/gsm_08_08.c
@@ -495,12 +495,7 @@

if (gscon_is_aoip(conn)) {
gen_bss_supported_codec_list(, msc, conn_get_bts(conn));
-   if (scl.len > 0)
-   resp = gsm0808_create_layer3_2(msg, 
cgi_for_msc(conn->sccp.msc, conn_get_bts(conn)), );
-   else {
-   LOGP(DMSC, LOGL_ERROR, "Failed to create layer3 message 
due to empty speech codec list.\n");
-   return false;
-   }
+   resp = gsm0808_create_layer3_2(msg, cgi_for_msc(conn->sccp.msc, 
conn_get_bts(conn)), );
} else
resp = gsm0808_create_layer3_2(msg, cgi_for_msc(conn->sccp.msc, 
conn_get_bts(conn)), NULL);


--
To view, visit https://gerrit.osmocom.org/11387
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: Id7332e5273ff0efb85043dd1e1bb804cfe2db944
Gerrit-Change-Number: 11387
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 


Build failed in Jenkins: master-asn1c » a1=default,a2=default,a3=default,osmocom-master-debian9 #278

2018-10-16 Thread jenkins
See 


--
[...truncated 3.67 KB...]

+ ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared 
libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared 
libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared 
libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking for autoconf... /usr/bin/autoconf
checking for autoheader... /usr/bin/autoheader
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking 

Change in osmo-sgsn[master]: Add --version cmdline option

2018-10-16 Thread osmith
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/11385


Change subject: Add --version cmdline option
..

Add --version cmdline option

Related: OS#3576
Change-Id: Icdb2bd9ec90511b51428800d17f8ce81f6804670
---
M src/gprs/gtphub_main.c
1 file changed, 7 insertions(+), 1 deletion(-)



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

diff --git a/src/gprs/gtphub_main.c b/src/gprs/gtphub_main.c
index a1a2c1d..f824016 100644
--- a/src/gprs/gtphub_main.c
+++ b/src/gprs/gtphub_main.c
@@ -238,6 +238,7 @@
printf("  -e,--log-level   Set a global log level.\n");
printf("  -r,--restart-file  File for counting restarts [%s].\n",
   ccfg->restart_counter_file);
+   printf("  -V,--version Print the version number.\n");
 }

 static void list_categories(void)
@@ -265,10 +266,11 @@
{"timestamp", 0, 0, 'T'},
{"log-level", 1, 0, 'e'},
{"restart-file", 1, 0, 'r'},
+   { "version", 0, 0, 'V' },
{NULL, 0, 0, 0}
};

-   c = getopt_long(argc, argv, "hd:Dc:sTe:r:",
+   c = getopt_long(argc, argv, "hd:Dc:sTe:r:V",
long_options, _index);
if (c == -1) {
if (optind < argc) {
@@ -310,6 +312,10 @@
case 'r':
ccfg->restart_counter_file = optarg;
break;
+   case 'V':
+   print_version(1);
+   exit(EXIT_SUCCESS);
+   break;
default:
LOGP(DGTPHUB, LOGL_FATAL, "Invalid command line 
argument, abort.\n");
exit(1);

--
To view, visit https://gerrit.osmocom.org/11385
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: Icdb2bd9ec90511b51428800d17f8ce81f6804670
Gerrit-Change-Number: 11385
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 


Change in osmo-sip-connector[master]: Add --version cmdline option

2018-10-16 Thread osmith
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/11384


Change subject: Add --version cmdline option
..

Add --version cmdline option

Related: OS#3577
Change-Id: Ibdda54acddde0ac03e202286736d56b6fa51a365
---
M src/main.c
1 file changed, 7 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-sip-connector 
refs/changes/84/11384/1

diff --git a/src/main.c b/src/main.c
index 560995e..0661498 100644
--- a/src/main.c
+++ b/src/main.c
@@ -81,6 +81,7 @@
printf("OsmoSIPcon: MNCC to SIP bridge\n");
printf("  -h --help\tthis text\n");
printf("  -c --config-file NAME\tThe config file to use [%s]\n", 
config_file);
+   printf("  -V --version\tPrint the version number\n");
 }

 static void handle_options(int argc, char **argv)
@@ -90,10 +91,11 @@
static struct option long_options[] = {
{"help", 0, 0, 'h'},
{"config-file", 1, 0, 'c'},
+   {"version", 0, 0, 'V' },
{NULL, 0, 0, 0}
};

-   c = getopt_long(argc, argv, "hc:",
+   c = getopt_long(argc, argv, "hc:V",
long_options, _index);
if (c == -1)
break;
@@ -105,6 +107,10 @@
case 'c':
config_file = optarg;
break;
+   case 'V':
+   print_version(1);
+   exit(EXIT_SUCCESS);
+   break;
}
}
 }

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

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibdda54acddde0ac03e202286736d56b6fa51a365
Gerrit-Change-Number: 11384
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 


Change in libosmocore[master]: gsm0808: allow decoding of zero length speech codec lists.

2018-10-16 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/11373 )

Change subject: gsm0808: allow decoding of zero length speech codec lists.
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/11373
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: I1eb1f4466b98bdd26d765b0e4cc690b5e89e9dd6
Gerrit-Change-Number: 11373
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Tue, 16 Oct 2018 14:54:07 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-mgw[master]: osmux: allow enabling osmux only on correct activating state

2018-10-16 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/11380


Change subject: osmux: allow enabling osmux only on correct activating state
..

osmux: allow enabling osmux only on correct activating state

State ACTIVATING is set once negotiation between the 2 parts went
successfuly.

Port from openbsc 96bd7b075a59eb051079152241b127ca944b0781.
Change-Id: Ic56eda1251be41369d869e687a1cf955df2c6d61
---
M src/libosmo-mgcp/mgcp_osmux.c
1 file changed, 3 insertions(+), 3 deletions(-)



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

diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index 38cd3bd..2828d83 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -536,9 +536,9 @@
uint16_t osmux_dummy = endp->cfg->osmux_dummy;

/* Check if osmux is enabled for the specified connection */
-   if (conn->osmux.state == OSMUX_STATE_DISABLED) {
-   LOGP(DLMGCP, LOGL_ERROR, "OSMUX not enabled for conn:%s\n",
-mgcp_conn_dump(conn->conn));
+   if (conn->osmux.state != OSMUX_STATE_ACTIVATING) {
+   LOGP(DLMGCP, LOGL_ERROR, "conn:%s didn't negotiate Osmux, state 
%d\n",
+mgcp_conn_dump(conn->conn), conn->osmux.state);
return -1;
}


--
To view, visit https://gerrit.osmocom.org/11380
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: Ic56eda1251be41369d869e687a1cf955df2c6d61
Gerrit-Change-Number: 11380
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-mgw[master]: osmux_send_dummy: Avoid logging incorrectly and sending if osmux not ...

2018-10-16 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/11376


Change subject: osmux_send_dummy: Avoid logging incorrectly and sending if 
osmux not enabled
..

osmux_send_dummy: Avoid logging incorrectly and sending if osmux not enabled

Port from openbsc 37a0307b6193c9b108cfd1aa2a88517a8b5cb907.
Change-Id: Iabc84cb482a425d4a6c2bb08c20b2e02a5a86b36
---
M src/libosmo-mgcp/mgcp_osmux.c
1 file changed, 8 insertions(+), 0 deletions(-)



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

diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index bc9eca2..2e58c55 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -641,12 +641,20 @@
LOGP(DLMGCP, LOGL_ERROR,
 "Could not activate osmux for conn:%s\n",
 mgcp_conn_dump(conn->conn));
+   return 0;
}
LOGP(DLMGCP, LOGL_ERROR,
 "Osmux CID %u for %s:%u is now enabled\n",
 conn->osmux.cid, inet_ntoa(conn->end.addr),
 endp->cfg->osmux_port);
}
+   if(conn->osmux.state != OSMUX_STATE_ENABLED) {
+   LOGP(DLMGCP, LOGL_ERROR,
+"OSMUX dummy to %s CID %u: Osmux not enabled on endpoint 
0x%x state %d\n",
+inet_ntoa(conn->end.addr), conn->osmux.cid,
+ENDPOINT_NUMBER(endp), conn->osmux.state);
+return 0;
+   }
LOGP(DLMGCP, LOGL_DEBUG,
 "sending OSMUX dummy load to %s CID %u\n",
 inet_ntoa(conn->end.addr), conn->osmux.cid);

--
To view, visit https://gerrit.osmocom.org/11376
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: Iabc84cb482a425d4a6c2bb08c20b2e02a5a86b36
Gerrit-Change-Number: 11376
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-mgw[master]: osmux: Avoid processing further frames if conn not found

2018-10-16 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/11383


Change subject: osmux: Avoid processing further frames if conn not found
..

osmux: Avoid processing further frames if conn not found

Other frames can come from known connections, so let's keep processing
each of them.

Change-Id: I09190140ba917dfada4b0952230b68e0f5f6d43d
---
M src/libosmo-mgcp/mgcp_osmux.c
1 file changed, 2 insertions(+), 2 deletions(-)



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

diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index ca446ff..a2c138d 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -394,7 +394,7 @@
/* FIXME: Get rid of CONN_ID_XXX! */
conn_bts = mgcp_conn_get_rtp(endp, CONN_ID_BTS);
if (!conn_bts)
-   goto out;
+   continue;

if (!endp) {
LOGP(DLMGCP, LOGL_ERROR,
@@ -478,7 +478,7 @@
/* FIXME: Get rid of CONN_ID_XXX! */
conn_net = mgcp_conn_get_rtp(endp, CONN_ID_NET);
if (!conn_net)
-   goto out;
+   continue;

if (!endp) {
LOGP(DLMGCP, LOGL_ERROR,

--
To view, visit https://gerrit.osmocom.org/11383
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: I09190140ba917dfada4b0952230b68e0f5f6d43d
Gerrit-Change-Number: 11383
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-mgw[master]: osmux.h: Document enum osmux_state

2018-10-16 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/11382


Change subject: osmux.h: Document enum osmux_state
..

osmux.h: Document enum osmux_state

Port for openbsc 9ae32d0d0607f270f20239b8104e09ec20352301.
Change-Id: I28978fa505d259f144457f29af4ba615aeaac74c
---
M include/osmocom/mgcp/osmux.h
1 file changed, 4 insertions(+), 5 deletions(-)



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

diff --git a/include/osmocom/mgcp/osmux.h b/include/osmocom/mgcp/osmux.h
index ea849c8..685be9c 100644
--- a/include/osmocom/mgcp/osmux.h
+++ b/include/osmocom/mgcp/osmux.h
@@ -24,10 +24,10 @@
 int osmux_used_cid(void);

 enum osmux_state {
-   OSMUX_STATE_DISABLED = 0,
-   OSMUX_STATE_NEGOTIATING,
-   OSMUX_STATE_ACTIVATING,
-   OSMUX_STATE_ENABLED,
+   OSMUX_STATE_DISABLED = 0, /* Osmux not being currently used by endp */
+   OSMUX_STATE_NEGOTIATING,  /* Osmux was locally requested in MGCP CRCX */
+   OSMUX_STATE_ACTIVATING,   /* Osmux was accepted in MGCP CRCX ACK. It 
can now be enabled by \ref osmux_enable_endpoint. */
+   OSMUX_STATE_ENABLED,  /* Osmux was initialized by \ref 
osmux_enable_endpoint and can process frames */
 };

 enum osmux_usage {
@@ -35,4 +35,3 @@
OSMUX_USAGE_ON = 1,
OSMUX_USAGE_ONLY = 2,
 };
-

--
To view, visit https://gerrit.osmocom.org/11382
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: I28978fa505d259f144457f29af4ba615aeaac74c
Gerrit-Change-Number: 11382
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-mgw[master]: osmux: Make func handling dummy frames independent of endp type

2018-10-16 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/11379


Change subject: osmux: Make func handling dummy frames independent of endp type
..

osmux: Make func handling dummy frames independent of endp type

Port from openbsc 8f321179747f64819d940d72d0212192f69284ca.
Change-Id: I3e16217737fd5ffb95c166c5f7344492cb6a6263
---
M src/libosmo-mgcp/mgcp_osmux.c
1 file changed, 9 insertions(+), 8 deletions(-)



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

diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index 9081873..38cd3bd 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -387,30 +387,31 @@

 /* This is called from the bsc-nat */
 static int osmux_handle_dummy(struct mgcp_config *cfg, struct sockaddr_in 
*addr,
- struct msgb *msg)
+ struct msgb *msg, int endp_type)
 {
struct mgcp_endpoint *endp;
uint8_t osmux_cid;
-   struct mgcp_conn_rtp *conn_net = NULL;
+   struct mgcp_conn_rtp *conn = NULL;

if (osmux_legacy_dummy_parse_cid(addr, msg, _cid) < 0)
goto out;

-   endp = endpoint_lookup(cfg, osmux_cid, >sin_addr, MGCP_DEST_BTS);
+   endp = endpoint_lookup(cfg, osmux_cid, >sin_addr, endp_type);
if (!endp) {
LOGP(DLMGCP, LOGL_ERROR,
 "Cannot find endpoint for Osmux CID %d\n", osmux_cid);
goto out;
}

-   conn_net = mgcp_conn_get_rtp(endp, CONN_ID_NET);
-   if (!conn_net)
+   /* FIXME: Get rid of CONN_ID_XXX! */
+   conn = mgcp_conn_get_rtp(endp, endp_type == MGCP_DEST_BTS ? CONN_ID_NET 
: CONN_ID_BTS);
+   if (!conn)
goto out;

-   if (conn_net->osmux.state == OSMUX_STATE_ENABLED)
+   if (conn->osmux.state == OSMUX_STATE_ENABLED)
goto out;

-   if (osmux_enable_conn(endp, conn_net, >sin_addr, addr->sin_port) 
< 0 ) {
+   if (osmux_enable_conn(endp, conn, >sin_addr, addr->sin_port) < 0 
) {
LOGP(DLMGCP, LOGL_ERROR,
 "Could not enable osmux in endpoint 0x%x\n",
 ENDPOINT_NUMBER(endp));
@@ -446,7 +447,7 @@

/* not any further processing dummy messages */
if (msg->data[0] == MGCP_DUMMY_LOAD)
-   return osmux_handle_dummy(cfg, , msg);
+   return osmux_handle_dummy(cfg, , msg, MGCP_DEST_BTS);

rem = msg->len;
while((osmuxh = osmux_xfrm_output_pull(msg)) != NULL) {

--
To view, visit https://gerrit.osmocom.org/11379
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: I3e16217737fd5ffb95c166c5f7344492cb6a6263
Gerrit-Change-Number: 11379
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-mgw[master]: mgcp: Log endpoint nr consistently as hex

2018-10-16 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/11375


Change subject: mgcp: Log endpoint nr consistently as hex
..

mgcp: Log endpoint nr consistently as hex

Port from openbsc 078905a0603c91b227854abfa01c9e24143e39a1.
Change-Id: Idcb40e6fd561b24e111afe7463f44c43c530fac5
---
M src/libosmo-mgcp/mgcp_osmux.c
M src/libosmo-mgcp/mgcp_protocol.c
M tests/mgcp/mgcp_test.c
3 files changed, 5 insertions(+), 5 deletions(-)



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

diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index 9ae82cd..bc9eca2 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -407,12 +407,12 @@

if (osmux_enable_conn(endp, conn_net, >sin_addr, addr->sin_port) 
< 0 ) {
LOGP(DLMGCP, LOGL_ERROR,
-"Could not enable osmux in endpoint %d\n",
+"Could not enable osmux in endpoint 0x%x\n",
 ENDPOINT_NUMBER(endp));
goto out;
}

-   LOGP(DLMGCP, LOGL_INFO, "Enabling osmux in endpoint %d for %s:%u\n",
+   LOGP(DLMGCP, LOGL_INFO, "Enabling osmux in endpoint 0x%x for %s:%u\n",
 ENDPOINT_NUMBER(endp), inet_ntoa(addr->sin_addr),
 ntohs(addr->sin_port));
 out:
diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c
index bc191b5..e17bdae 100644
--- a/src/libosmo-mgcp/mgcp_protocol.c
+++ b/src/libosmo-mgcp/mgcp_protocol.c
@@ -691,7 +691,7 @@
if (!strcmp(token, "C"))
endp->x_osmo_ign |= MGCP_X_OSMO_IGN_CALLID;
else
-   LOGP(DLMGCP, LOGL_ERROR, "endpoint %x: received unknown 
X-Osmo-IGN item '%s'\n",
+   LOGP(DLMGCP, LOGL_ERROR, "endpoint 0x%x: received 
unknown X-Osmo-IGN item '%s'\n",
 ENDPOINT_NUMBER(endp), token);
}

diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c
index 4cb16dd..a540056 100644
--- a/tests/mgcp/mgcp_test.c
+++ b/tests/mgcp/mgcp_test.c
@@ -550,7 +550,7 @@
 static int mgcp_test_policy_cb(struct mgcp_trunk_config *cfg, int endpoint,
   int state, const char *transactio_id)
 {
-   fprintf(stderr, "Policy CB got state %d on endpoint %d\n",
+   fprintf(stderr, "Policy CB got state %d on endpoint 0x%x\n",
state, endpoint);
last_endpoint = endpoint;
return MGCP_POLICY_CONT;
@@ -813,7 +813,7 @@
OSMO_ASSERT(last_endpoint != -1);
endp = >trunk.endpoints[last_endpoint];

-   fprintf(stderr, "endpoint %d: "
+   fprintf(stderr, "endpoint 0x%x: "
"payload type %d (expected %d)\n",
last_endpoint,
conn->end.codec->payload_type, t->ptype);

--
To view, visit https://gerrit.osmocom.org/11375
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: Idcb40e6fd561b24e111afe7463f44c43c530fac5
Gerrit-Change-Number: 11375
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-mgw[master]: osmux: Improve checks around activating and using enabled osmux

2018-10-16 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/11381


Change subject: osmux: Improve checks around activating and using enabled osmux
..

osmux: Improve checks around activating and using enabled osmux

* Refactor code to have unified checks on all paths activating Osmux.
* Improve checkings at activation time and add logging.
* Code now enforces endp osmux status to be enabled before processing
the frame through endp->osmux.out. Before, a delayed or bad pkt could
arrive and be processed by an endp with osmux not enabled, using
endp->osmux.out that was not initialized and ended up crashing:
libosmo-netif/src/osmux.c:281:3: runtime error: member access within null 
pointer of type 'struct msgb'

This could also happen if a BSC started sending or we received (non legacy 
dummy) osmux
frames before we received the BSC CRCX ACK agreeing on osmux negotiation
and switching to ACTIVATING state.

Related: SYS#4350

Port from openbsc 4a2cc9eb0a0f9424c16b26fcb757483a39d67482.
Includes fixup from openbsc I438349bffaa46a10ad8983090a4b17aed7e00d82.
Change-Id: Iac11e447ec0d76e4e74ec982a6e3f63b35548978
---
M src/libosmo-mgcp/mgcp_osmux.c
1 file changed, 43 insertions(+), 41 deletions(-)



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

diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index 2828d83..ca446ff 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -316,6 +316,34 @@
return msg;
 }

+/* Updates endp osmux state and returns 0 if it can process messages, -1 
otherwise */
+static int endp_osmux_state_check(struct mgcp_endpoint *endp, struct 
mgcp_conn_rtp *conn,
+ bool sending)
+{
+   switch(conn->osmux.state) {
+   case OSMUX_STATE_ACTIVATING:
+   if (osmux_enable_conn(endp, conn, >end.addr, 
htons(endp->cfg->osmux_port)) < 0) {
+   LOGP(DLMGCP, LOGL_ERROR,
+   "Could not enable osmux for conn:%s\n",
+   mgcp_conn_dump(conn->conn));
+   return -1;
+   }
+   LOGP(DLMGCP, LOGL_ERROR,
+   "Osmux CID %u for %s:%u is now enabled\n",
+   conn->osmux.cid, inet_ntoa(conn->end.addr),
+   endp->cfg->osmux_port);
+   return 0;
+   case OSMUX_STATE_ENABLED:
+   return 0;
+   default:
+   LOGP(DLMGCP, LOGL_ERROR,
+"Osmux %s in conn %s without full negotiation, state %d\n",
+sending ? "sent" : "received",
+mgcp_conn_dump(conn->conn), conn->osmux.state);
+   return -1;
+   }
+}
+
 static int osmux_legacy_dummy_parse_cid(struct sockaddr_in *addr, struct msgb 
*msg,
uint8_t *osmux_cid)
 {
@@ -374,11 +402,12 @@
 osmuxh->circuit_id);
goto out;
}
-   conn_bts->osmux.stats.octets += osmux_chunk_length(msg, rem);
-   conn_bts->osmux.stats.chunks++;
+   if (endp_osmux_state_check(endp, conn_bts, false) == 0) {
+   conn_bts->osmux.stats.octets += osmux_chunk_length(msg, 
rem);
+   conn_bts->osmux.stats.chunks++;
+   osmux_xfrm_output_sched(_bts->osmux.out, osmuxh);
+   }
rem = msg->len;
-
-   osmux_xfrm_output_sched(_bts->osmux.out, osmuxh);
}
 out:
msgb_free(msg);
@@ -408,19 +437,8 @@
if (!conn)
goto out;

-   if (conn->osmux.state == OSMUX_STATE_ENABLED)
-   goto out;
-
-   if (osmux_enable_conn(endp, conn, >sin_addr, addr->sin_port) < 0 
) {
-   LOGP(DLMGCP, LOGL_ERROR,
-"Could not enable osmux in endpoint 0x%x\n",
-ENDPOINT_NUMBER(endp));
-   goto out;
-   }
-
-   LOGP(DLMGCP, LOGL_INFO, "Enabling osmux in endpoint 0x%x for %s:%u\n",
-ENDPOINT_NUMBER(endp), inet_ntoa(addr->sin_addr),
-ntohs(addr->sin_port));
+   endp_osmux_state_check(endp, conn, false);
+   /* Only needed to punch hole in firewall, it can be dropped */
 out:
msgb_free(msg);
return 0;
@@ -468,11 +486,12 @@
 osmuxh->circuit_id);
goto out;
}
-   conn_net->osmux.stats.octets += osmux_chunk_length(msg, rem);
-   conn_net->osmux.stats.chunks++;
+   if (endp_osmux_state_check(endp, conn_net, false) == 0) {
+   conn_net->osmux.stats.octets += osmux_chunk_length(msg, 
rem);
+   conn_net->osmux.stats.chunks++;
+   osmux_xfrm_output_sched(_net->osmux.out, osmuxh);
+   

Change in osmo-mgw[master]: osmux: Move parse_cid of legacy dummy frames to own function

2018-10-16 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/11378


Change subject: osmux: Move parse_cid of legacy dummy frames to own function
..

osmux: Move parse_cid of legacy dummy frames to own function

Backport from openbsc b010f869c915016b7fa97a26621582cd89de96b0.
Change-Id: I5766165985fbfcecc63d45b9e229322bc8cedf52
---
M src/libosmo-mgcp/mgcp_osmux.c
1 file changed, 15 insertions(+), 10 deletions(-)



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

diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index 2e6307e..9081873 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -316,6 +316,20 @@
return msg;
 }

+static int osmux_legacy_dummy_parse_cid(struct sockaddr_in *addr, struct msgb 
*msg,
+   uint8_t *osmux_cid)
+{
+   if (msg->len < 1 + sizeof(osmux_cid)) {
+   LOGP(DLMGCP, LOGL_ERROR,
+"Discarding truncated Osmux dummy load\n");
+   return -1;
+   }
+
+   /* extract the osmux CID from the dummy message */
+   memcpy(osmux_cid, >data[1], sizeof(*osmux_cid));
+   return 0;
+}
+
 #define osmux_chunk_length(msg, rem) (rem - msg->len);

 int osmux_read_from_bsc_nat_cb(struct osmo_fd *ofd, unsigned int what)
@@ -379,17 +393,8 @@
uint8_t osmux_cid;
struct mgcp_conn_rtp *conn_net = NULL;

-   if (msg->len < 1 + sizeof(osmux_cid)) {
-   LOGP(DLMGCP, LOGL_ERROR,
-"Discarding truncated Osmux dummy load\n");
+   if (osmux_legacy_dummy_parse_cid(addr, msg, _cid) < 0)
goto out;
-   }
-
-   LOGP(DLMGCP, LOGL_DEBUG, "Received Osmux dummy load from %s\n",
-inet_ntoa(addr->sin_addr));
-
-   /* extract the osmux CID from the dummy message */
-   memcpy(_cid, >data[1], sizeof(osmux_cid));

endp = endpoint_lookup(cfg, osmux_cid, >sin_addr, MGCP_DEST_BTS);
if (!endp) {

--
To view, visit https://gerrit.osmocom.org/11378
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: I5766165985fbfcecc63d45b9e229322bc8cedf52
Gerrit-Change-Number: 11378
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-mgw[master]: osmux: Don't process regular osmux frames if disabled by cfg

2018-10-16 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/11377


Change subject: osmux: Don't process regular osmux frames if disabled by cfg
..

osmux: Don't process regular osmux frames if disabled by cfg

Prior to this commit, the check was only done on legacy dummy frames.

Port from openbsc a42d4584fd01c9cd1021fab609bdaaafe859c13a.
Change-Id: I5b6606d72a9f5ae593a8e3ab5fbbe7e1e5a0ae11
---
M src/libosmo-mgcp/mgcp_osmux.c
1 file changed, 12 insertions(+), 6 deletions(-)



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

diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index 2e58c55..2e6307e 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -331,6 +331,12 @@
if (!msg)
return -1;

+   if (!cfg->osmux) {
+   LOGP(DLMGCP, LOGL_ERROR,
+"bsc-nat wants to use Osmux but bsc did not request it\n");
+   goto out;
+   }
+
/* not any further processing dummy messages */
if (msg->data[0] == MGCP_DUMMY_LOAD)
goto out;
@@ -382,12 +388,6 @@
LOGP(DLMGCP, LOGL_DEBUG, "Received Osmux dummy load from %s\n",
 inet_ntoa(addr->sin_addr));

-   if (!cfg->osmux) {
-   LOGP(DLMGCP, LOGL_ERROR,
-"bsc wants to use Osmux but bsc-nat did not request it\n");
-   goto out;
-   }
-
/* extract the osmux CID from the dummy message */
memcpy(_cid, >data[1], sizeof(osmux_cid));

@@ -433,6 +433,12 @@
if (!msg)
return -1;

+   if (!cfg->osmux) {
+   LOGP(DLMGCP, LOGL_ERROR,
+"bsc wants to use Osmux but bsc-nat did not request it\n");
+   goto out;
+   }
+
/* not any further processing dummy messages */
if (msg->data[0] == MGCP_DUMMY_LOAD)
return osmux_handle_dummy(cfg, , msg);

--
To view, visit https://gerrit.osmocom.org/11377
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: I5b6606d72a9f5ae593a8e3ab5fbbe7e1e5a0ae11
Gerrit-Change-Number: 11377
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-mgw[master]: osmux: Avoid initing output without enabling osmux

2018-10-16 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/11374


Change subject: osmux: Avoid initing output without enabling osmux
..

osmux: Avoid initing output without enabling osmux

Otherwise we end up in a weird state where we have timers set up but
osmux is still flagged as not enabled.

Cherry-picked from openbsc cad739d2386640a68c24e3d470ddacdcaf377561.
Change-Id: I0a334842463d311bc80a980e60fb702a0a9ad610
---
M src/libosmo-mgcp/mgcp_osmux.c
1 file changed, 5 insertions(+), 5 deletions(-)



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

diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index f842232..9ae82cd 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -284,7 +284,7 @@
};

rate_ctr_inc(_net->rate_ctr_group->ctr[RTP_PACKETS_TX_CTR]);
-   rate_ctr_add(_net->rate_ctr_group->ctr[RTP_OCTETS_TX_CTR], 
msg->len);
+   rate_ctr_add(_net->rate_ctr_group->ctr[RTP_OCTETS_TX_CTR], 
msg->len);

/* Send RTP data to BTS */
/* FIXME: Get rid of conn_bts and conn_net! */
@@ -530,10 +530,6 @@
return -1;
}

-   osmux_xfrm_output_init(>osmux.out,
-  (conn->osmux.cid * rtp_ssrc_winlen) +
-  (random() % rtp_ssrc_winlen));
-
conn->osmux.in = osmux_handle_lookup(endp->cfg, addr, port);
if (!conn->osmux.in) {
LOGP(DLMGCP, LOGL_ERROR, "Cannot allocate input osmux handle 
for conn:%s\n",
@@ -546,6 +542,10 @@
return -1;
}

+   osmux_xfrm_output_init(>osmux.out,
+  (conn->osmux.cid * rtp_ssrc_winlen) +
+  (random() % rtp_ssrc_winlen));
+
switch (endp->cfg->role) {
case MGCP_BSC_NAT:
conn->type = MGCP_OSMUX_BSC_NAT;

--
To view, visit https://gerrit.osmocom.org/11374
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: I0a334842463d311bc80a980e60fb702a0a9ad610
Gerrit-Change-Number: 11374
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in libosmocore[master]: gsm0808: allow decoding of zero length speech codec lists.

2018-10-16 Thread dexter
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/11373


Change subject: gsm0808: allow decoding of zero length speech codec lists.
..

gsm0808: allow decoding of zero length speech codec lists.

3GPP_TS_48.008, 3.2.2.103 Speech Codec List states the following:

"The length indicator (octet 2) is a binary number indicating the
absolute length of the contents after the length indicator.
The length depends on the number and type of Speech Codec Elements
to be included. The minimum length of one Speech Codec Element is 1
octet and the maximum length is 3 octets. The maximum number of
Speech Codec Elements within the Speech Codec List is not defined."

This clearly refers only to the length of a single speech codec
element but not on the overall list. So speech codec lists with
length 0 are indeed permitted by the spec.

- Remove the assertion that checks on zero length speech codec
  lists.

Change-Id: I1eb1f4466b98bdd26d765b0e4cc690b5e89e9dd6
Related: OS#3657
---
M src/gsm/gsm0808_utils.c
M tests/gsm0808/gsm0808_test.c
2 files changed, 23 insertions(+), 10 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/73/11373/1

diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c
index 886f546..2348105 100644
--- a/src/gsm/gsm0808_utils.c
+++ b/src/gsm/gsm0808_utils.c
@@ -349,9 +349,6 @@
OSMO_ASSERT(msg);
OSMO_ASSERT(scl);

-   /* Empty list */
-   OSMO_ASSERT(scl->len >= 1);
-
msgb_put_u8(msg, GSM0808_IE_SPEECH_CODEC_LIST);
tlv_len = msgb_put(msg, 1);
old_tail = msg->tail;
@@ -384,8 +381,6 @@
OSMO_ASSERT(scl);
if (!elem)
return -EINVAL;
-   if (len == 0)
-   return -EINVAL;

memset(scl, 0, sizeof(*scl));

@@ -404,11 +399,6 @@

scl->len = decoded;

-   /* Empty list */
-   if (decoded < 1) {
-   return -EINVAL;
-   }
-
return (int)(elem - old_elem);
 }

diff --git a/tests/gsm0808/gsm0808_test.c b/tests/gsm0808/gsm0808_test.c
index 8cf1cf4..0b2794f 100644
--- a/tests/gsm0808/gsm0808_test.c
+++ b/tests/gsm0808/gsm0808_test.c
@@ -695,6 +695,28 @@
msgb_free(msg);
 }

+static void test_gsm0808_enc_dec_empty_speech_codec_list()
+{
+   struct gsm0808_speech_codec_list enc_scl = {
+   .len = 0,
+   };
+   struct gsm0808_speech_codec_list dec_scl = {};
+   struct msgb *msg;
+   uint8_t rc_enc;
+   int rc_dec;
+
+   msg = msgb_alloc(1024, "output buffer");
+   rc_enc = gsm0808_enc_speech_codec_list(msg, _scl);
+   OSMO_ASSERT(rc_enc == 2);
+
+   rc_dec = gsm0808_dec_speech_codec_list(_scl, msg->data + 2, 
msg->len - 2);
+   OSMO_ASSERT(rc_dec == 0);
+
+   OSMO_ASSERT(memcmp(_scl, _scl, sizeof(enc_scl)) == 0);
+
+   msgb_free(msg);
+}
+
 static void test_gsm0808_enc_dec_channel_type()
 {
struct gsm0808_channel_type enc_ct = {
@@ -1725,6 +1747,7 @@
test_gsm0808_enc_dec_speech_codec_ext_with_cfg();
test_gsm0808_enc_dec_speech_codec_with_cfg();
test_gsm0808_enc_dec_speech_codec_list();
+   test_gsm0808_enc_dec_empty_speech_codec_list();
test_gsm0808_enc_dec_channel_type();
test_gsm0808_enc_dec_encrypt_info();


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1eb1f4466b98bdd26d765b0e4cc690b5e89e9dd6
Gerrit-Change-Number: 11373
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 


Change in osmo-bsc[master]: vty 'show bts'/'show trx': display IPs and ports

2018-10-16 Thread osmith
osmith has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11290 )

Change subject: vty 'show bts'/'show trx': display IPs and ports
..

vty 'show bts'/'show trx': display IPs and ports

This quickly allows knowing which IP a BTS is using in order to SSH
into it. Example output:

OsmoBSC> show trx
...
  Baseband Transceiver NM State: Oper 'Enabled', Admin 'Unlocked', Avail 'OK'
  ip.access stream ID: 0x00 (r=192.168.1.178:34090<->l=192.168.1.37:3003)
...

OsmoBSC> show bts
...
  Paging: 0 pending requests, 50 free slots
  OML Link: (r=192.168.1.178:57692<->l=192.168.1.37:3002)
  OML Link state: connected 0 days 0 hours 0 min. 17 sec.
...

Related: OS#3145
Change-Id: I37f020fcdb68cafcdbdb621808483d1dd996354f
---
M src/osmo-bsc/bsc_vty.c
1 file changed, 18 insertions(+), 2 deletions(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index 8e6ff3e..f156cc8 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -38,6 +38,7 @@
 #include 

 #include 
+#include 
 #include 
 #include 
 #include 
@@ -289,6 +290,19 @@
e1l->tei, e1l->sapi, VTY_NEWLINE);
 }

+/*! Dump the IP addresses and ports of the input signal link's timeslot.
+ *  This only makes sense for links connected with ipaccess.
+ *  Example output: "(r=10.1.42.1:55416<->l=10.1.42.123:3003)" */
+static void e1isl_dump_vty_tcp(struct vty *vty, const struct e1inp_sign_link 
*e1l)
+{
+   if (e1l) {
+   char *name = osmo_sock_get_name(NULL, 
e1l->ts->driver.ipaccess.fd.fd);
+   vty_out(vty, "%s", name);
+   talloc_free(name);
+   }
+   vty_out(vty, "%s", VTY_NEWLINE);
+}
+
 static void vty_out_neigh_list(struct vty *vty, struct bitvec *bv)
 {
int count = 0;
@@ -445,6 +459,8 @@
paging_pending_requests_nr(bts),
bts->paging.available_slots, VTY_NEWLINE);
if (is_ipaccess_bts(bts)) {
+   vty_out(vty, "  OML Link: ");
+   e1isl_dump_vty_tcp(vty, bts->oml_link);
vty_out(vty, "  OML Link state: %s", get_model_oml_status(bts));
sec = bts_uptime(bts);
if (sec)
@@ -1046,8 +1062,8 @@
vty_out(vty, "  Baseband Transceiver NM State: ");
net_dump_nmstate(vty, >bb_transc.mo.nm_state);
if (is_ipaccess_bts(trx->bts)) {
-   vty_out(vty, "  ip.access stream ID: 0x%02x%s",
-   trx->rsl_tei, VTY_NEWLINE);
+   vty_out(vty, "  ip.access stream ID: 0x%02x ", trx->rsl_tei);
+   e1isl_dump_vty_tcp(vty, trx->rsl_link);
} else {
vty_out(vty, "  E1 Signalling Link:%s", VTY_NEWLINE);
e1isl_dump_vty(vty, trx->rsl_link);

--
To view, visit https://gerrit.osmocom.org/11290
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: I37f020fcdb68cafcdbdb621808483d1dd996354f
Gerrit-Change-Number: 11290
Gerrit-PatchSet: 5
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 


Change in docker-playground[master]: jenkins-common.sh: add docker_images_require()

2018-10-16 Thread osmith
osmith has posted comments on this change. ( https://gerrit.osmocom.org/11365 )

Change subject: jenkins-common.sh: add docker_images_require()
..


Patch Set 1:

(3 comments)

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

https://gerrit.osmocom.org/#/c/11365/1//COMMIT_MSG@13
PS1, Line 13: Unless the NO_DOCKER_IMAGE_BUILD environment variable is 
specified,
> This documentation should go in the source tree, to not be lost to future 
> readers in the commit hist […]
Done


https://gerrit.osmocom.org/#/c/11365/1//COMMIT_MSG@22
PS1, Line 22: on which a job depends. But it is not maintained anymore. And in 
that
> I added it and use it, it never was maintained by anyone besides me I guess, 
> but "not maintained" is […]
How about: "nobody updates it when adding new docker images and some targets 
*don't build out of the box* with it" instead? :p

(Left it out in the next patch)


https://gerrit.osmocom.org/#/c/11365/1/jenkins-common.sh
File jenkins-common.sh:

https://gerrit.osmocom.org/#/c/11365/1/jenkins-common.sh@5
PS1, Line 5: docker_images_require() {
> I don't see any callers of this function .. […]
In this commit, yes. But the next commit it will be used from all jenkins.sh 
files. Would it have been better to do both changes in one commit instead of 
two?



--
To view, visit https://gerrit.osmocom.org/11365
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: I0afdf3400282634fca9b31d57eaeedd6b5c28aa1
Gerrit-Change-Number: 11365
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Tue, 16 Oct 2018 13:49:02 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in docker-playground[master]: Remove top-level Makefile

2018-10-16 Thread osmith
osmith has uploaded a new patch set (#3). ( https://gerrit.osmocom.org/11369 )

Change subject: Remove top-level Makefile
..

Remove top-level Makefile

Obsoleted by docker_images_require(). The top-level Makefile had the
following drawbacks:
* it was not maintained: many targets were missing, and some of the
  existing ones did not build anymore
* make targets have the same names as the folders, so if they are not
  listed in the Makefile, it will assume that the target has been built
  already (prone to making mistakes)

Related: OS#3268
Change-Id: Id18a9a7a70f85127e6f6c9447d71764018bdb4ff
---
D Makefile
1 file changed, 0 insertions(+), 82 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/69/11369/3
--
To view, visit https://gerrit.osmocom.org/11369
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id18a9a7a70f85127e6f6c9447d71764018bdb4ff
Gerrit-Change-Number: 11369
Gerrit-PatchSet: 3
Gerrit-Owner: osmith 
Gerrit-Reviewer: osmith 
Gerrit-CC: Neels Hofmeyr 


Change in docker-playground[master]: jenkins.sh: IMAGE_SUFFIX, docker_images_require()

2018-10-16 Thread osmith
osmith has uploaded a new patch set (#3). ( https://gerrit.osmocom.org/11366 )

Change subject: jenkins.sh: IMAGE_SUFFIX, docker_images_require()
..

jenkins.sh: IMAGE_SUFFIX, docker_images_require()

Default value "master" of the IMAGE_SUFFIX environment variable can be
changed to "latest" to test the latest stable builds instead of the
nightly ones. Use docker_images_require() to make sure that the required
images are existing and up-to-date before running the tests.

Related: OS#3268
Change-Id: Idbb708ab16cb71bab5069127945b63388222369e
---
M m3ua-test/jenkins.sh
M sua-test/jenkins.sh
M ttcn3-bsc-test/jenkins-sccplite.sh
M ttcn3-bsc-test/jenkins.sh
M ttcn3-bts-test/jenkins.sh
M ttcn3-ggsn-test/jenkins.sh
M ttcn3-hlr-test/jenkins.sh
M ttcn3-mgw-test/jenkins.sh
M ttcn3-msc-test/jenkins.sh
M ttcn3-sgsn-test/jenkins.sh
M ttcn3-sip-test/jenkins.sh
11 files changed, 97 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/66/11366/3
--
To view, visit https://gerrit.osmocom.org/11366
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idbb708ab16cb71bab5069127945b63388222369e
Gerrit-Change-Number: 11366
Gerrit-PatchSet: 3
Gerrit-Owner: osmith 
Gerrit-Reviewer: osmith 
Gerrit-CC: Neels Hofmeyr 


Change in docker-playground[master]: symlinks: nplab-m3ua-test, nplab-sua-test

2018-10-16 Thread osmith
osmith has uploaded a new patch set (#3). ( https://gerrit.osmocom.org/11368 )

Change subject: symlinks: nplab-m3ua-test, nplab-sua-test
..

symlinks: nplab-m3ua-test, nplab-sua-test

Allows writing a generic Jenkins Job Builder config.

Related: OS#3268
Change-Id: Iedf9a8cd9af1da674e018a08a977490520e602de
---
A nplab-m3ua-test
A nplab-sua-test
2 files changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/68/11368/3
--
To view, visit https://gerrit.osmocom.org/11368
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iedf9a8cd9af1da674e018a08a977490520e602de
Gerrit-Change-Number: 11368
Gerrit-PatchSet: 3
Gerrit-Owner: osmith 


Change in docker-playground[master]: symlinks: ttcn3-bsc-test-sccplite

2018-10-16 Thread osmith
Hello Harald Welte,

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

https://gerrit.osmocom.org/11367

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

Change subject: symlinks: ttcn3-bsc-test-sccplite
..

symlinks: ttcn3-bsc-test-sccplite

Create the ttcn3-bsc-test-sccplite folder, with symlinks to
ttcn3-bsc-test/jenkins-sccplite.sh and ttcn3-bsc-test/sccplite. This
allows writing the jenkins job builder config files in a generic way.

Related: OS#3268
Change-Id: I1d1d277475090cd615a0e2d07a42b2032cdefb9c
---
A ttcn3-bsc-test-sccplite/jenkins.sh
A ttcn3-bsc-test-sccplite/sccplite
2 files changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/67/11367/3
--
To view, visit https://gerrit.osmocom.org/11367
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I1d1d277475090cd615a0e2d07a42b2032cdefb9c
Gerrit-Change-Number: 11367
Gerrit-PatchSet: 3
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 


Change in docker-playground[master]: jenkins-common.sh: add docker_images_require()

2018-10-16 Thread osmith
Hello Neels Hofmeyr,

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

https://gerrit.osmocom.org/11365

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

Change subject: jenkins-common.sh: add docker_images_require()
..

jenkins-common.sh: add docker_images_require()

This new function can be used on top of each *-test/jenkins.sh to
automatically build the required Docker images before starting a
testsuite.

The top-level Makefile should also be able to build all Docker images
on which a job depends. But in that Makefile the list of dependencies
can not be specified dynamically, as it will be necessary for OS#3268:
ttcn3-mgw-test may depend on osmo-mgw-latest or on osmo-mgw-master.

Related: OS#3268
Change-Id: I0afdf3400282634fca9b31d57eaeedd6b5c28aa1
---
M jenkins-common.sh
1 file changed, 19 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/65/11365/2
--
To view, visit https://gerrit.osmocom.org/11365
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0afdf3400282634fca9b31d57eaeedd6b5c28aa1
Gerrit-Change-Number: 11365
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Neels Hofmeyr 


Change in docker-playground[master]: osmo-*-latest: s/nightly/latest/g in Dockerfile

2018-10-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11364 )

Change subject: osmo-*-latest: s/nightly/latest/g in Dockerfile
..


Patch Set 1: Code-Review+2

that may actually have been intentional, i.e. to test the nightly libraries 
with the "master" of the given application under tests?  But yes, that should 
probably be separate from testing "latest" of both the libraries and the 
application under test.


--
To view, visit https://gerrit.osmocom.org/11364
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: I1eab031038927043faf6ed8ed30bdf4d4d1624d5
Gerrit-Change-Number: 11364
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Comment-Date: Tue, 16 Oct 2018 13:45:28 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in docker-playground[master]: symlinks: ttcn3-bsc-test-sccplite

2018-10-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11367 )

Change subject: symlinks: ttcn3-bsc-test-sccplite
..


Patch Set 2: Verified+1 Code-Review+2


--
To view, visit https://gerrit.osmocom.org/11367
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: I1d1d277475090cd615a0e2d07a42b2032cdefb9c
Gerrit-Change-Number: 11367
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Comment-Date: Tue, 16 Oct 2018 13:44:09 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: remote-BSS neighbors: allow only one cell ID

2018-10-16 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11371 )

Change subject: remote-BSS neighbors: allow only one cell ID
..

remote-BSS neighbors: allow only one cell ID

I believe I have initially misinterpreted the idea behind sending a Cell
Identifier List in BSSMAP Handover Required messages. Instead of associating N
Cell Identifiers with one ARFCN+BSIC, the idea is to add up N separate
ARFCN+BSIC's Cell Identifiers into a list. To keep the door open for future
code simplification, make sure to allow only one Cell Identifier per remote
ARFCN+BSIC on the VTY UI.

Related: OS#3656
Change-Id: Ifb9212fede2333ad68db94188b5cda4fcabe02f8
---
M src/osmo-bsc/neighbor_ident_vty.c
M tests/neighbor_ident.vty
2 files changed, 112 insertions(+), 21 deletions(-)

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



diff --git a/src/osmo-bsc/neighbor_ident_vty.c 
b/src/osmo-bsc/neighbor_ident_vty.c
index 409153b..203b150 100644
--- a/src/osmo-bsc/neighbor_ident_vty.c
+++ b/src/osmo-bsc/neighbor_ident_vty.c
@@ -258,6 +258,7 @@
 {
int rc;
struct gsm_bts *local_neigh;
+   const struct gsm0808_cell_id_list2 *exists;
struct gsm0808_cell_id_list2 cil;
struct gsm_bts *bts = vty->index;
 
@@ -289,6 +290,15 @@
return add_local_bts(vty, local_neigh);
}

+   /* Allow only one cell ID per remote-BSS neighbor, see OS#3656 */
+   exists = neighbor_ident_get(g_neighbor_cells, key);
+   if (exists) {
+   vty_out(vty, "%% Error: only one Cell Identifier entry is 
allowed per remote neighbor."
+   " Already have: %s -> %s%s", 
neighbor_ident_key_name(key),
+   gsm0808_cell_id_list_name(exists), VTY_NEWLINE);
+   return CMD_WARNING;
+   }
+
/* The cell_id is not known in this BSS, so it must be a remote cell. */
gsm0808_cell_id_to_list(, cell_id);
rc = neighbor_ident_add(g_neighbor_cells, key, );
diff --git a/tests/neighbor_ident.vty b/tests/neighbor_ident.vty
index 4f86383..2ce2231 100644
--- a/tests/neighbor_ident.vty
+++ b/tests/neighbor_ident.vty
@@ -211,29 +211,29 @@
 OsmoBSC(config-net-bts)# neighbor lac-ci 21 31
 % BTS 0 already had local neighbor BTS 1 with LAC 21 CI 31 and ARFCN 41 BSIC 11
 OsmoBSC(config-net-bts)# neighbor cgi 23 42 423 5 arfcn 23 bsic 42
-% BTS 0 to ARFCN 23 BSIC 42 now has 1 remote BSS Cell Identifier List entry
+% Error: only one Cell Identifier entry is allowed per remote neighbor. 
Already have: BTS 0 to ARFCN 23 BSIC 42 -> CGI[1]:{023-42-423-5}
 OsmoBSC(config-net-bts)# neighbor cgi 23 42 423 5 arfcn 23 bsic 42
-% BTS 0 to ARFCN 23 BSIC 42 now has 1 remote BSS Cell Identifier List entry
+% Error: only one Cell Identifier entry is allowed per remote neighbor. 
Already have: BTS 0 to ARFCN 23 BSIC 42 -> CGI[1]:{023-42-423-5}
 OsmoBSC(config-net-bts)# neighbor cgi 23 42 423 5 arfcn 23 bsic 42
-% BTS 0 to ARFCN 23 BSIC 42 now has 1 remote BSS Cell Identifier List entry
+% Error: only one Cell Identifier entry is allowed per remote neighbor. 
Already have: BTS 0 to ARFCN 23 BSIC 42 -> CGI[1]:{023-42-423-5}

 OsmoBSC(config-net-bts)# neighbor cgi 23 042 423 6 arfcn 23 bsic 42
-% BTS 0 to ARFCN 23 BSIC 42 now has 2 remote BSS Cell Identifier List entries
+% Error: only one Cell Identifier entry is allowed per remote neighbor. 
Already have: BTS 0 to ARFCN 23 BSIC 42 -> CGI[1]:{023-42-423-5}

 OsmoBSC(config-net-bts)# neighbor lac 456 arfcn 123 bsic 45
 % BTS 0 to ARFCN 123 BSIC 45 now has 1 remote BSS Cell Identifier List entry

 OsmoBSC(config-net-bts)# neighbor cgi 23 042 234 56 arfcn 23 bsic 42
-% BTS 0 to ARFCN 23 BSIC 42 now has 3 remote BSS Cell Identifier List entries
+% Error: only one Cell Identifier entry is allowed per remote neighbor. 
Already have: BTS 0 to ARFCN 23 BSIC 42 -> CGI[1]:{023-42-423-5}

 OsmoBSC(config-net-bts)# neighbor lac-ci 789 10 arfcn 423 bsic any
 % BTS 0 to ARFCN 423 (any BSIC) now has 1 remote BSS Cell Identifier List entry

 OsmoBSC(config-net-bts)# neighbor lac-ci 789 10 arfcn 423 bsic 63
-% BTS 0 to ARFCN 423 BSIC 63 now has 1 remote BSS Cell Identifier List entry
+% Error: only one Cell Identifier entry is allowed per remote neighbor. 
Already have: BTS 0 to ARFCN 423 BSIC 63 -> LAC-CI[1]:{789-10}

 OsmoBSC(config-net-bts)# neighbor lac-ci 789 10 arfcn 423 bsic 1
-% BTS 0 to ARFCN 423 BSIC 1 now has 1 remote BSS Cell Identifier List entry
+% Error: only one Cell Identifier entry is allowed per remote neighbor. 
Already have: BTS 0 to ARFCN 423 BSIC 1 -> LAC-CI[1]:{789-10}

 OsmoBSC(config-net-bts)# show running-config
 ...
@@ -244,12 +244,8 @@
   neighbor bts 1
   neighbor bts 2
   neighbor cgi 023 42 423 5 arfcn 23 bsic 42
-  neighbor cgi 023 042 423 6 arfcn 23 bsic 42
-  neighbor cgi 023 042 234 56 arfcn 23 bsic 42
   neighbor lac 456 arfcn 123 bsic 45
   neighbor lac-ci 789 

Change in osmo-bsc[master]: remote-BSS neighbors: allow only one cell ID

2018-10-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11371 )

Change subject: remote-BSS neighbors: allow only one cell ID
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/11371
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: Ifb9212fede2333ad68db94188b5cda4fcabe02f8
Gerrit-Change-Number: 11371
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Tue, 16 Oct 2018 13:42:14 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: remote-BSS neighbors: allow only one cell ID

2018-10-16 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/11371


Change subject: remote-BSS neighbors: allow only one cell ID
..

remote-BSS neighbors: allow only one cell ID

I believe I have initially misinterpreted the idea behind sending a Cell
Identifier List in BSSMAP Handover Required messages. Instead of associating N
Cell Identifiers with one ARFCN+BSIC, the idea is to add up N separate
ARFCN+BSIC's Cell Identifiers into a list. To keep the door open for future
code simplification, make sure to allow only one Cell Identifier per remote
ARFCN+BSIC on the VTY UI.

Related: OS#3656
Change-Id: Ifb9212fede2333ad68db94188b5cda4fcabe02f8
---
M src/osmo-bsc/neighbor_ident_vty.c
M tests/neighbor_ident.vty
2 files changed, 112 insertions(+), 21 deletions(-)



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

diff --git a/src/osmo-bsc/neighbor_ident_vty.c 
b/src/osmo-bsc/neighbor_ident_vty.c
index 409153b..203b150 100644
--- a/src/osmo-bsc/neighbor_ident_vty.c
+++ b/src/osmo-bsc/neighbor_ident_vty.c
@@ -258,6 +258,7 @@
 {
int rc;
struct gsm_bts *local_neigh;
+   const struct gsm0808_cell_id_list2 *exists;
struct gsm0808_cell_id_list2 cil;
struct gsm_bts *bts = vty->index;

@@ -289,6 +290,15 @@
return add_local_bts(vty, local_neigh);
}

+   /* Allow only one cell ID per remote-BSS neighbor, see OS#3656 */
+   exists = neighbor_ident_get(g_neighbor_cells, key);
+   if (exists) {
+   vty_out(vty, "%% Error: only one Cell Identifier entry is 
allowed per remote neighbor."
+   " Already have: %s -> %s%s", 
neighbor_ident_key_name(key),
+   gsm0808_cell_id_list_name(exists), VTY_NEWLINE);
+   return CMD_WARNING;
+   }
+
/* The cell_id is not known in this BSS, so it must be a remote cell. */
gsm0808_cell_id_to_list(, cell_id);
rc = neighbor_ident_add(g_neighbor_cells, key, );
diff --git a/tests/neighbor_ident.vty b/tests/neighbor_ident.vty
index 4f86383..2ce2231 100644
--- a/tests/neighbor_ident.vty
+++ b/tests/neighbor_ident.vty
@@ -211,29 +211,29 @@
 OsmoBSC(config-net-bts)# neighbor lac-ci 21 31
 % BTS 0 already had local neighbor BTS 1 with LAC 21 CI 31 and ARFCN 41 BSIC 11
 OsmoBSC(config-net-bts)# neighbor cgi 23 42 423 5 arfcn 23 bsic 42
-% BTS 0 to ARFCN 23 BSIC 42 now has 1 remote BSS Cell Identifier List entry
+% Error: only one Cell Identifier entry is allowed per remote neighbor. 
Already have: BTS 0 to ARFCN 23 BSIC 42 -> CGI[1]:{023-42-423-5}
 OsmoBSC(config-net-bts)# neighbor cgi 23 42 423 5 arfcn 23 bsic 42
-% BTS 0 to ARFCN 23 BSIC 42 now has 1 remote BSS Cell Identifier List entry
+% Error: only one Cell Identifier entry is allowed per remote neighbor. 
Already have: BTS 0 to ARFCN 23 BSIC 42 -> CGI[1]:{023-42-423-5}
 OsmoBSC(config-net-bts)# neighbor cgi 23 42 423 5 arfcn 23 bsic 42
-% BTS 0 to ARFCN 23 BSIC 42 now has 1 remote BSS Cell Identifier List entry
+% Error: only one Cell Identifier entry is allowed per remote neighbor. 
Already have: BTS 0 to ARFCN 23 BSIC 42 -> CGI[1]:{023-42-423-5}

 OsmoBSC(config-net-bts)# neighbor cgi 23 042 423 6 arfcn 23 bsic 42
-% BTS 0 to ARFCN 23 BSIC 42 now has 2 remote BSS Cell Identifier List entries
+% Error: only one Cell Identifier entry is allowed per remote neighbor. 
Already have: BTS 0 to ARFCN 23 BSIC 42 -> CGI[1]:{023-42-423-5}

 OsmoBSC(config-net-bts)# neighbor lac 456 arfcn 123 bsic 45
 % BTS 0 to ARFCN 123 BSIC 45 now has 1 remote BSS Cell Identifier List entry

 OsmoBSC(config-net-bts)# neighbor cgi 23 042 234 56 arfcn 23 bsic 42
-% BTS 0 to ARFCN 23 BSIC 42 now has 3 remote BSS Cell Identifier List entries
+% Error: only one Cell Identifier entry is allowed per remote neighbor. 
Already have: BTS 0 to ARFCN 23 BSIC 42 -> CGI[1]:{023-42-423-5}

 OsmoBSC(config-net-bts)# neighbor lac-ci 789 10 arfcn 423 bsic any
 % BTS 0 to ARFCN 423 (any BSIC) now has 1 remote BSS Cell Identifier List entry

 OsmoBSC(config-net-bts)# neighbor lac-ci 789 10 arfcn 423 bsic 63
-% BTS 0 to ARFCN 423 BSIC 63 now has 1 remote BSS Cell Identifier List entry
+% Error: only one Cell Identifier entry is allowed per remote neighbor. 
Already have: BTS 0 to ARFCN 423 BSIC 63 -> LAC-CI[1]:{789-10}

 OsmoBSC(config-net-bts)# neighbor lac-ci 789 10 arfcn 423 bsic 1
-% BTS 0 to ARFCN 423 BSIC 1 now has 1 remote BSS Cell Identifier List entry
+% Error: only one Cell Identifier entry is allowed per remote neighbor. 
Already have: BTS 0 to ARFCN 423 BSIC 1 -> LAC-CI[1]:{789-10}

 OsmoBSC(config-net-bts)# show running-config
 ...
@@ -244,12 +244,8 @@
   neighbor bts 1
   neighbor bts 2
   neighbor cgi 023 42 423 5 arfcn 23 bsic 42
-  neighbor cgi 023 042 423 6 arfcn 23 bsic 42
-  neighbor cgi 023 042 234 56 arfcn 23 bsic 42
   neighbor lac 456 arfcn 123 bsic 45
   neighbor lac-ci 789 10 arfcn 423 

Change in docker-playground[master]: Remove top-level Makefile

2018-10-16 Thread osmith
osmith has posted comments on this change. ( https://gerrit.osmocom.org/11369 )

Change subject: Remove top-level Makefile
..


Patch Set 2:

> ok, fine, but what I'm missing here is: if I come along and want to 'make 
> ttcn3-bsc-test' to get the latest bsc images, what do I invoke instead on my 
> shell? I added the top-level makefile mostly for such human convenience.

We discusses this in the chat after you wrote this, and you said it's okay for 
you to use one of the following instead of your current 
make-then-call-jenkins.sh-workflow.

  $ ./jenkins.sh
  $ NO_DOCKER_IMAGE_BUILD=1 ./jenkins.sh


--
To view, visit https://gerrit.osmocom.org/11369
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: Id18a9a7a70f85127e6f6c9447d71764018bdb4ff
Gerrit-Change-Number: 11369
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: osmith 
Gerrit-CC: Neels Hofmeyr 
Gerrit-Comment-Date: Tue, 16 Oct 2018 13:12:36 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in docker-playground[master]: jenkins.sh: IMAGE_SUFFIX, docker_images_require()

2018-10-16 Thread osmith
osmith has posted comments on this change. ( https://gerrit.osmocom.org/11366 )

Change subject: jenkins.sh: IMAGE_SUFFIX, docker_images_require()
..


Patch Set 2:

(3 comments)

> As you will notice in the comments, it's not so easy for me to let go of my 
> current use pattern of 'make ttcn3-bsc-test' once, then invoke jenkins.sh as 
> many times I like

We discusses this in the chat after you wrote this, and you said it's okay for 
you to use one of the following instead of your current 
make-then-call-jenkins.sh-workflow.

  $ ./jenkins.sh
  $ NO_DOCKER_IMAGE_BUILD=1 ./jenkins.sh

https://gerrit.osmocom.org/#/c/11366/1/m3ua-test/jenkins.sh
File m3ua-test/jenkins.sh:

https://gerrit.osmocom.org/#/c/11366/1/m3ua-test/jenkins.sh@4
PS1, Line 4: IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}"
> I still prefer […]
Done


https://gerrit.osmocom.org/#/c/11366/1/m3ua-test/jenkins.sh@6
PS1, Line 6:"debian-jessie-build" \
> so it is not enough to issue the osmo-stp-foo image below, to also rebuild 
> the images that it depend […]
I thought about resolving these dependencies in jenkins-common.sh, but that 
would add a lot more code than the two additional lines (debian-jessie-build, 
debian-stretch-titan) in these jenkins.sh files. So having it here is probably 
the nicer solution, although it is a bit redundant.


https://gerrit.osmocom.org/#/c/11366/1/m3ua-test/jenkins.sh@7
PS1, Line 7:"osmo-stp-$IMAGE_SUFFIX" \
> with IMAGE_SUFFIX, I think of ".img". […]
There's already a FEED variable in 
docker-playground.git/debian-repo-install-test/jenkins.sh, which takes 
different values ("nightly" and "latest"). Here "master" and "latest" is 
accepted, so it might get confusing.

However, if you still prefer FEED_NAME (or have another suggestion), I can 
change it of course.



--
To view, visit https://gerrit.osmocom.org/11366
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: Idbb708ab16cb71bab5069127945b63388222369e
Gerrit-Change-Number: 11366
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: osmith 
Gerrit-CC: Neels Hofmeyr 
Gerrit-Comment-Date: Tue, 16 Oct 2018 13:06:13 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in docker-playground[master]: jenkins.sh: IMAGE_SUFFIX, docker_images_require()

2018-10-16 Thread osmith
osmith has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/11366 )

Change subject: jenkins.sh: IMAGE_SUFFIX, docker_images_require()
..

jenkins.sh: IMAGE_SUFFIX, docker_images_require()

Default value "master" of the IMAGE_SUFFIX environment variable can be
changed to "latest" to test the latest stable builds instead of the
nightly ones. Use docker_images_require() to make sure that the required
images are existing and up-to-date before running the tests.

Related: OS#3268
Change-Id: Idbb708ab16cb71bab5069127945b63388222369e
---
M m3ua-test/jenkins.sh
M sua-test/jenkins.sh
M ttcn3-bsc-test/jenkins-sccplite.sh
M ttcn3-bsc-test/jenkins.sh
M ttcn3-bts-test/jenkins.sh
M ttcn3-ggsn-test/jenkins.sh
M ttcn3-hlr-test/jenkins.sh
M ttcn3-mgw-test/jenkins.sh
M ttcn3-msc-test/jenkins.sh
M ttcn3-sgsn-test/jenkins.sh
M ttcn3-sip-test/jenkins.sh
11 files changed, 97 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/66/11366/2
--
To view, visit https://gerrit.osmocom.org/11366
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idbb708ab16cb71bab5069127945b63388222369e
Gerrit-Change-Number: 11366
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-CC: Neels Hofmeyr 


Change in docker-playground[master]: jenkins.sh: new IMAGE_SUFFIX environment variable

2018-10-16 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/11366 )

Change subject: jenkins.sh: new IMAGE_SUFFIX environment variable
..


Patch Set 1:

(4 comments)

I see this is moving from make-style dependency tracking to naming each 
required image explicitly. It is also adding image rebuilding to the jenkins.sh 
directly. As you will notice in the comments, it's not so easy for me to let go 
of my current use pattern of 'make ttcn3-bsc-test' once, then invoke jenkins.sh 
as many times I like, but yeah. I think I can deal with it if any alternative 
would mean a lot of effort for the 'latest' tests ... ?

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

https://gerrit.osmocom.org/#/c/11366/1//COMMIT_MSG@7
PS1, Line 7: jenkins.sh: new IMAGE_SUFFIX environment variable
actually, the most profound change here is that you add calls to 
docker_images_require().


https://gerrit.osmocom.org/#/c/11366/1/m3ua-test/jenkins.sh
File m3ua-test/jenkins.sh:

https://gerrit.osmocom.org/#/c/11366/1/m3ua-test/jenkins.sh@4
PS1, Line 4: [ -z "$IMAGE_SUFFIX" ] && IMAGE_SUFFIX="master"
I still prefer

  if [ -z xyz ]; then abc; fi

we are C hackers after all. Or if you want to be scripty, rather go for the 
if-unset shell pattern:

  FOO="${FOO:-bar}"


https://gerrit.osmocom.org/#/c/11366/1/m3ua-test/jenkins.sh@6
PS1, Line 6:"debian-jessie-build" \
so it is not enough to issue the osmo-stp-foo image below, to also rebuild the 
images that it depends on? That was the idea of the top-level makefile: build 
that image *after* all of its dependencies, implicitly.


https://gerrit.osmocom.org/#/c/11366/1/m3ua-test/jenkins.sh@7
PS1, Line 7:"osmo-stp-$IMAGE_SUFFIX" \
with IMAGE_SUFFIX, I think of ".img". How about FEED_NAME



--
To view, visit https://gerrit.osmocom.org/11366
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: Idbb708ab16cb71bab5069127945b63388222369e
Gerrit-Change-Number: 11366
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-CC: Neels Hofmeyr 
Gerrit-Comment-Date: Tue, 16 Oct 2018 11:36:35 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in docker-playground[master]: jenkins-common.sh: add docker_images_require()

2018-10-16 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/11365 )

Change subject: jenkins-common.sh: add docker_images_require()
..


Patch Set 1: Code-Review-1

(3 comments)

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

https://gerrit.osmocom.org/#/c/11365/1//COMMIT_MSG@13
PS1, Line 13: Unless the NO_DOCKER_IMAGE_BUILD environment variable is 
specified,
This documentation should go in the source tree, to not be lost to future 
readers in the commit history.

The commit log is more about why the change is needed and how that was 
achieved, why/how a choice was made. The info on how things should be used 
definitely belong in READMEs or file comments or online doc, instead.


https://gerrit.osmocom.org/#/c/11365/1//COMMIT_MSG@22
PS1, Line 22: on which a job depends. But it is not maintained anymore. And in 
that
I added it and use it, it never was maintained by anyone besides me I guess, 
but "not maintained" is a bit harsh :P


https://gerrit.osmocom.org/#/c/11365/1/jenkins-common.sh
File jenkins-common.sh:

https://gerrit.osmocom.org/#/c/11365/1/jenkins-common.sh@5
PS1, Line 5: docker_images_require() {
I don't see any callers of this function .. is it dead code?



--
To view, visit https://gerrit.osmocom.org/11365
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: I0afdf3400282634fca9b31d57eaeedd6b5c28aa1
Gerrit-Change-Number: 11365
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Comment-Date: Tue, 16 Oct 2018 11:23:15 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in docker-playground[master]: osmo-*-latest: s/nightly/latest/g in Dockerfile

2018-10-16 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/11364 )

Change subject: osmo-*-latest: s/nightly/latest/g in Dockerfile
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/11364
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: I1eab031038927043faf6ed8ed30bdf4d4d1624d5
Gerrit-Change-Number: 11364
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Comment-Date: Tue, 16 Oct 2018 11:20:56 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in docker-playground[master]: Remove top-level Makefile

2018-10-16 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/11369 )

Change subject: Remove top-level Makefile
..


Patch Set 1:

ok, fine, but what I'm missing here is: if I come along and want to 'make 
ttcn3-bsc-test' to get the latest bsc images, what do I invoke instead on my 
shell? I added the top-level makefile mostly for such human convenience.

Would it make sense to still have a Makefile that redirects to the shell script 
implementation? Or maybe a thin shell script to include jenkins-common.sh and 
invoke docker_images_require() is easier?


--
To view, visit https://gerrit.osmocom.org/11369
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: Id18a9a7a70f85127e6f6c9447d71764018bdb4ff
Gerrit-Change-Number: 11369
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-CC: Neels Hofmeyr 
Gerrit-Comment-Date: Tue, 16 Oct 2018 11:19:43 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in docker-playground[master]: Remove top-level Makefile

2018-10-16 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/11369 )

Change subject: Remove top-level Makefile
..


Patch Set 1:

Hey! My Makefile!


--
To view, visit https://gerrit.osmocom.org/11369
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: Id18a9a7a70f85127e6f6c9447d71764018bdb4ff
Gerrit-Change-Number: 11369
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-CC: Neels Hofmeyr 
Gerrit-Comment-Date: Tue, 16 Oct 2018 11:11:37 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-bsc[master]: handover_decision_2.c: implement HO to remote BSS

2018-10-16 Thread Neels Hofmeyr
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/11321

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

Change subject: handover_decision_2.c: implement HO to remote BSS
..

handover_decision_2.c: implement HO to remote BSS

Implement basic support for inter-BSC HO from handover_decision_2: do inter-BSC
handover only when rxlev / rxqual / ta drop below the minimum requirements.

I considered adding a vty config flag to disable/enable remote-BSS handover,
but to avoid inter-BSC HO the user can simply refrain from configuring
neighbors for a particular cell.

In collect_assignment_candidate(), it is important to clear out any new
candidate entry. Hence adopt the same pattern as below: first compose a new
(cleared) candidate, then write the entry into the list.

Related: OS#3638
Change-Id: Id78ac1b2016998a2931a23d62ec7a3f37bb764c6
---
M src/osmo-bsc/handover_decision_2.c
1 file changed, 185 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/21/11321/5
--
To view, visit https://gerrit.osmocom.org/11321
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: Id78ac1b2016998a2931a23d62ec7a3f37bb764c6
Gerrit-Change-Number: 11321
Gerrit-PatchSet: 5
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-ci[master]: jobs: testsuite.yml for all ttcn3/nplab jobs

2018-10-16 Thread osmith
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/11370


Change subject: jobs: testsuite.yml for all ttcn3/nplab jobs
..

jobs: testsuite.yml for all ttcn3/nplab jobs

New JJB config, that is able to generate all jobs in the TTCN3 tab at
Jenkins: 

The new *-latest jobs test against the latest stable releases. Existing
jobs are not overwritten (this is commented out).
ttcn3-bsc-test-sccplite-latest is disabled for now, because it hangs
forever.

Related: OS#3268
Change-Id: Ie433925ee81a61c5788b4a6f2bc5b89c2689d251
---
A jobs/testsuite.yml
1 file changed, 75 insertions(+), 0 deletions(-)



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

diff --git a/jobs/testsuite.yml b/jobs/testsuite.yml
new file mode 100644
index 000..b8b62d4
--- /dev/null
+++ b/jobs/testsuite.yml
@@ -0,0 +1,75 @@
+---
+- project:
+name: 'testsuite'
+concurrent: false
+disabled: false
+jobs:
+  - "{testsuite-name}{job-suffix}"
+# Folders from docker-playground.git
+testsuite-name:
+  - nplab-m3ua-test
+  - nplab-sua-test
+  - ttcn3-bsc-test
+  - ttcn3-bsc-test-sccplite:
+  disabled: true
+  - ttcn3-bts-test
+  - ttcn3-ggsn-test
+  - ttcn3-hlr-test
+  - ttcn3-mgw-test
+  - ttcn3-msc-test
+  - ttcn3-sgsn-test
+  - ttcn3-sip-test
+job-suffix:
+  # latest stable
+  - "-latest":
+  image-suffix: "latest"
+  # nightly (overwrites the existing, manually created jobs!)
+  # - ""
+  #image-suffix: "master"
+- job-template:
+name: '{testsuite-name}{job-suffix}'
+project-type: freestyle
+disabled: '{obj:disabled}'
+defaults: global
+description: |
+Run the {testsuite-name} testsuite from
+https://git.osmocom.org/docker-playground/;>docker-playground.git.
+If this job ends in -latest, the job runs the latest 
stable versions of the Osmocom stack.
+Otherwise the nightly builds.
+Generated with the jenkins-job-builder config introduced in
+https://osmocom.org/issues/3268;>OS#3268.
+See https://osmocom.org/projects/cellular-infrastructure/wiki/Titan_TTCN3_Testsuites;>
+TTCN3 Testsuite for more information.
+node: ttcn3
+parameters:
+  - string:
+  name: BRANCH
+  description: |
+Branch of docker-playground.git.
+Only modify if you are hacking on the docker-playground 
scripts.
+  default: '*/master'
+
+builders:
+  - shell: |-
+  cd {testsuite-name}
+  IMAGE_SUFFIX="{image-suffix}" ./jenkins.sh
+scm:
+  - git:
+  branches:
+- '$BRANCH'
+  url: git://git.osmocom.org/docker-playground
+  git-config-name: 'Jenkins Builder'
+  git-config-email: 'jenk...@osmocom.org'
+triggers:
+  - timed: "@midnight"
+publishers:
+  - junit:
+  results: '**/junit-xml-*.log'
+  allow-empty-results: false
+properties:
+- build-blocker:
+use-build-blocker: true
+blocking-jobs:
+  - "^{testsuite-name}.*"
+
+# vim: expandtab tabstop=2 shiftwidth=2

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie433925ee81a61c5788b4a6f2bc5b89c2689d251
Gerrit-Change-Number: 11370
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 


Change in docker-playground[master]: Remove top-level Makefile

2018-10-16 Thread osmith
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/11369


Change subject: Remove top-level Makefile
..

Remove top-level Makefile

Obsoleted by docker_images_require(). The top-level Makefile had the
following drawbacks:
* it was not maintained: many targets were missing, and some of the
  existing ones did not build anymore
* make targets have the same names as the folders, so if they are not
  listed in the Makefile, it will assume that the target has been built
  already (prone to making mistakes)

Related: OS#3268
Change-Id: Id18a9a7a70f85127e6f6c9447d71764018bdb4ff
---
D Makefile
1 file changed, 0 insertions(+), 82 deletions(-)



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

diff --git a/Makefile b/Makefile
deleted file mode 100644
index e224274..000
--- a/Makefile
+++ /dev/null
@@ -1,82 +0,0 @@
-.PHONY: build
-build: debian-jessie-build osmo-ggsn-master osmo-stp-master sctp-test 
sigtran-tests m3ua-test sua-test debian-stretch-titan ttcn3-ggsn-test
-
-.PHONY: debian-jessie-build
-debian-jessie-build:
-   $(MAKE) -C debian-jessie-build
-
-.PHONY: debian-stretch-titan
-debian-stretch-titan:
-   $(MAKE) -C debian-stretch-titan
-
-.PHONY: osmo-bsc-master
-osmo-bsc-master: debian-jessie-build
-   $(MAKE) -C osmo-bsc-master
-
-.PHONY: osmo-bts-master
-osmo-bts-master: debian-jessie-build
-   $(MAKE) -C osmo-bts-master
-
-.PHONY: osmo-msc-master
-osmo-msc-master: debian-jessie-build
-   $(MAKE) -C osmo-msc-master
-
-.PHONY: osmo-stp-master
-osmo-stp-master: debian-jessie-build
-   $(MAKE) -C osmo-stp-master
-
-.PHONY: osmocom-bb-host-master
-osmocom-bb-host-master: debian-jessie-build
-   $(MAKE) -C osmocom-bb-host-master
-
-.PHONY: osmo-ggsn-master
-osmo-ggsn-master: debian-jessie-build
-   $(MAKE) -C osmo-ggsn-master
-
-.PHONY: osmo-hlr-master
-osmo-hlr-master: debian-jessie-build
-   $(MAKE) -C osmo-hlr-master
-
-.PHONY: ttcn3-bsc-test
-ttcn3-bsc-test: debian-stretch-titan osmo-stp-master osmo-bsc-master 
osmo-bts-master ttcn3-bsc-test
-   $(MAKE) -C ttcn3-bsc-test
-
-.PHONY: ttcn3-bts-test
-ttcn3-bts-test: debian-stretch-titan osmo-bsc-master osmo-bts-master 
osmocom-bb-host-master ttcn3-bts-test
-   $(MAKE) -C ttcn3-bts-test
-
-.PHONY: ttcn3-msc-test
-ttcn3-msc-test: debian-stretch-titan osmo-stp-master osmo-msc-master 
ttcn3-msc-test
-   $(MAKE) -C ttcn3-msc-test
-
-.PHONY: ttcn3-ggsn-test
-ttcn3-ggsn-test: osmo-ggsn-test
-   $(MAKE) -C ggsn-test
-
-.PHONY: ttcn3-mgw-test
-ttcn3-mgw-test: debian-stretch-titan osmo-mgw-master
-   $(MAKE) -C ttcn3-mgw-test
-
-.PHONY: ttcn3-hlr-test
-ttcn3-hlr-test: debian-stretch-titan osmo-hlr-master
-   $(MAKE) -C ttcn3-hlr-test
-
-.PHONY: sctp-test
-sctp-test: debian-jessie-build
-   $(MAKE) -C sctp-test
-
-.PHONY: sigtran-tests
-sigtran-tests: debian-jessie-build
-   $(MAKE) -C sigtran-tests
-
-.PHONY: sua-test
-sua-test: osmo-stp-master
-   $(MAKE) -C sua-test
-
-.PHONY: m3ua-test
-m3ua-test: osmo-stp-master sigtran-tests
-   $(MAKE) -C m3ua-test
-
-.PHONY: gr-gsm-master
-gr-gsm-master:
-   $(MAKE) -C gr-gsm-master

--
To view, visit https://gerrit.osmocom.org/11369
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: Id18a9a7a70f85127e6f6c9447d71764018bdb4ff
Gerrit-Change-Number: 11369
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 


Change in docker-playground[master]: jenkins-common.sh: add docker_images_require()

2018-10-16 Thread osmith
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/11365


Change subject: jenkins-common.sh: add docker_images_require()
..

jenkins-common.sh: add docker_images_require()

This new function can be used on top of each *-test/jenkins.sh to
specify which Docker images are required before the test can be
executed.

Unless the NO_DOCKER_IMAGE_BUILD environment variable is specified,
it will build all of these images. With the existing logic, this will
only rebuild images if they are outdated and otherwise use the cached
version (in that case it goes through almost instantly).

It also aborts if an image is missing, so we don't need to find that
out by reading through the log after running an entire build job.

The top-level Makefile should also be able to build all Docker images
on which a job depends. But it is not maintained anymore. And in that
Makefile the list of dependencies can not be specified dynamically,
as it will be necessary for OS#3268: ttcn3-mgw-test may depend on
osmo-mgw-latest or on osmo-mgw-master.

Related: OS#3268
Change-Id: I0afdf3400282634fca9b31d57eaeedd6b5c28aa1
---
M jenkins-common.sh
1 file changed, 19 insertions(+), 0 deletions(-)



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

diff --git a/jenkins-common.sh b/jenkins-common.sh
index 515479f..f3d6c61 100644
--- a/jenkins-common.sh
+++ b/jenkins-common.sh
@@ -1,3 +1,22 @@
+docker_image_exists() {
+   test -n "$(docker images -q "$REPO_USER/$1")"
+}
+
+docker_images_require() {
+   for i in $@; do
+   # Trigger image build (cache will be used when up-to-date)
+   if [ -z "$NO_DOCKER_IMAGE_BUILD" ]; then
+   echo "Building image: $i (export 
NO_DOCKER_IMAGE_BUILD=1 to prevent this)"
+   make -C "../$i"
+   fi
+
+   # Detect missing images (build skipped/failure)
+   if ! docker_image_exists "$i"; then
+   echo "ERROR: missing image: $i"
+   exit 1
+   fi
+   done
+}

 network_create() {
NET=$1

--
To view, visit https://gerrit.osmocom.org/11365
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: I0afdf3400282634fca9b31d57eaeedd6b5c28aa1
Gerrit-Change-Number: 11365
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 


Change in docker-playground[master]: osmo-*-latest: s/nightly/latest/g in Dockerfile

2018-10-16 Thread osmith
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/11364


Change subject: osmo-*-latest: s/nightly/latest/g in Dockerfile
..

osmo-*-latest: s/nightly/latest/g in Dockerfile

Follow up to I6a564206dd81743deb1eb27eca7081bc333d7434 where the
"*-latest" Dockerfiles were introduced. msc, sgsn, sip, stp had
references to "nightly" instead of "latest" in their Dockerfiles.

Related: OS#3268
Change-Id: I1eab031038927043faf6ed8ed30bdf4d4d1624d5
---
M osmo-msc-latest/Dockerfile
M osmo-sgsn-latest/Dockerfile
M osmo-sip-latest/Dockerfile
M osmo-stp-latest/Dockerfile
4 files changed, 7 insertions(+), 7 deletions(-)



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

diff --git a/osmo-msc-latest/Dockerfile b/osmo-msc-latest/Dockerfile
index 02298e7..a8cc3ba 100644
--- a/osmo-msc-latest/Dockerfile
+++ b/osmo-msc-latest/Dockerfile
@@ -2,7 +2,7 @@

 MAINTAINER Harald Welte 

-ARG
OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_9.0/;
+ARG
OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/latest/Debian_9.0/;

 COPY   Release.key /tmp/Release.key

@@ -12,7 +12,7 @@

 RUNapt-key add /tmp/Release.key && \
rm /tmp/Release.key && \
-   echo "deb " $OSMOCOM_REPO " ./" > 
/etc/apt/sources.list.d/osmocom-nightly.list
+   echo "deb " $OSMOCOM_REPO " ./" > 
/etc/apt/sources.list.d/osmocom-latest.list

 ADD$OSMOCOM_REPO/Release /tmp/Release
 RUNapt-get update && \
diff --git a/osmo-sgsn-latest/Dockerfile b/osmo-sgsn-latest/Dockerfile
index 56b5fda..87dbca2 100644
--- a/osmo-sgsn-latest/Dockerfile
+++ b/osmo-sgsn-latest/Dockerfile
@@ -2,7 +2,7 @@

 MAINTAINER Harald Welte 

-ARG
OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_9.0/;
+ARG
OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/latest/Debian_9.0/;

 COPY   Release.key /tmp/Release.key

@@ -12,7 +12,7 @@

 RUNapt-key add /tmp/Release.key && \
rm /tmp/Release.key && \
-   echo "deb " $OSMOCOM_REPO " ./" > 
/etc/apt/sources.list.d/osmocom-nightly.list
+   echo "deb " $OSMOCOM_REPO " ./" > 
/etc/apt/sources.list.d/osmocom-latest.list

 ADD$OSMOCOM_REPO/Release /tmp/Release
 RUNapt-get update && \
diff --git a/osmo-sip-latest/Dockerfile b/osmo-sip-latest/Dockerfile
index 9f978d8..a468c9f 100644
--- a/osmo-sip-latest/Dockerfile
+++ b/osmo-sip-latest/Dockerfile
@@ -2,7 +2,7 @@

 MAINTAINER Harald Welte 

-ARG
OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_9.0/;
+ARG
OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/latest/Debian_9.0/;

 COPY   Release.key /tmp/Release.key

diff --git a/osmo-stp-latest/Dockerfile b/osmo-stp-latest/Dockerfile
index f5920a5..053e2ab 100644
--- a/osmo-stp-latest/Dockerfile
+++ b/osmo-stp-latest/Dockerfile
@@ -2,7 +2,7 @@
 
 MAINTAINER Harald Welte 

-ARG
OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_9.0/;
+ARG
OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/latest/Debian_9.0/;

 COPY   Release.key /tmp/Release.key

@@ -12,7 +12,7 @@

 RUNapt-key add /tmp/Release.key && \
rm /tmp/Release.key && \
-   echo "deb " $OSMOCOM_REPO " ./" > 
/etc/apt/sources.list.d/osmocom-nightly.list
+   echo "deb " $OSMOCOM_REPO " ./" > 
/etc/apt/sources.list.d/osmocom-latest.list

 ADD$OSMOCOM_REPO/Release /tmp/Release
 RUNapt-get update && \

--
To view, visit https://gerrit.osmocom.org/11364
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: I1eab031038927043faf6ed8ed30bdf4d4d1624d5
Gerrit-Change-Number: 11364
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 


Change in docker-playground[master]: symlinks: nplab-m3ua-test, nplab-sua-test

2018-10-16 Thread osmith
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/11368


Change subject: symlinks: nplab-m3ua-test, nplab-sua-test
..

symlinks: nplab-m3ua-test, nplab-sua-test

Allows writing a generic Jenkins Job Builder config.

Related: OS#3268
Change-Id: Iedf9a8cd9af1da674e018a08a977490520e602de
---
A nplab-m3ua-test
A nplab-sua-test
2 files changed, 2 insertions(+), 0 deletions(-)



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

diff --git a/nplab-m3ua-test b/nplab-m3ua-test
new file mode 12
index 000..4f3a365
--- /dev/null
+++ b/nplab-m3ua-test
@@ -0,0 +1 @@
+m3ua-test
\ No newline at end of file
diff --git a/nplab-sua-test b/nplab-sua-test
new file mode 12
index 000..2103b43
--- /dev/null
+++ b/nplab-sua-test
@@ -0,0 +1 @@
+sua-test
\ No newline at end of file

--
To view, visit https://gerrit.osmocom.org/11368
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: Iedf9a8cd9af1da674e018a08a977490520e602de
Gerrit-Change-Number: 11368
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 


Change in docker-playground[master]: jenkins.sh: new IMAGE_SUFFIX environment variable

2018-10-16 Thread osmith
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/11366


Change subject: jenkins.sh: new IMAGE_SUFFIX environment variable
..

jenkins.sh: new IMAGE_SUFFIX environment variable

Default value "master" can be changed to "latest" to test the latest
stable builds instead of the nightly ones. Use docker_images_require()
to make sure that the required images are existing and up-to-date
before running the tests.

Related: OS#3268
Change-Id: Idbb708ab16cb71bab5069127945b63388222369e
---
M m3ua-test/jenkins.sh
M sua-test/jenkins.sh
M ttcn3-bsc-test/jenkins-sccplite.sh
M ttcn3-bsc-test/jenkins.sh
M ttcn3-bts-test/jenkins.sh
M ttcn3-ggsn-test/jenkins.sh
M ttcn3-hlr-test/jenkins.sh
M ttcn3-mgw-test/jenkins.sh
M ttcn3-msc-test/jenkins.sh
M ttcn3-sgsn-test/jenkins.sh
M ttcn3-sip-test/jenkins.sh
11 files changed, 97 insertions(+), 18 deletions(-)



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

diff --git a/m3ua-test/jenkins.sh b/m3ua-test/jenkins.sh
index 61f7c05..a6625eb 100755
--- a/m3ua-test/jenkins.sh
+++ b/m3ua-test/jenkins.sh
@@ -1,6 +1,12 @@
 #!/bin/sh

 . ../jenkins-common.sh
+[ -z "$IMAGE_SUFFIX" ] && IMAGE_SUFFIX="master"
+docker_images_require \
+   "debian-jessie-build" \
+   "osmo-stp-$IMAGE_SUFFIX" \
+   "debian-stretch-titan" \
+   "m3ua-test"

 mkdir $VOL_BASE_DIR/m3ua-tester
 cp m3ua-param-testtool.scm all-sgp-tests.txt $VOL_BASE_DIR/m3ua-tester/
@@ -16,7 +22,7 @@
--network $NET_NAME --ip 172.18.7.200 \
-v $VOL_BASE_DIR/stp:/data \
--name ${BUILD_TAG}-stp \
-   -d $REPO_USER/osmo-stp-master
+   -d $REPO_USER/osmo-stp-$IMAGE_SUFFIX

 # start docker container with tests
 docker run --rm \
diff --git a/sua-test/jenkins.sh b/sua-test/jenkins.sh
index 0f87b4e..c6ceac5 100755
--- a/sua-test/jenkins.sh
+++ b/sua-test/jenkins.sh
@@ -1,6 +1,13 @@
 #!/bin/sh

 . ../jenkins-common.sh
+[ -z "$IMAGE_SUFFIX" ] && IMAGE_SUFFIX="master"
+docker_images_require \
+   "debian-jessie-build" \
+   "osmo-stp-$IMAGE_SUFFIX" \
+   "debian-stretch-titan" \
+   "sigtran-tests" \
+   "sua-test"

 mkdir $VOL_BASE_DIR/sua-tester
 cp sua-param-testtool-sgp.scm some-sua-sgp-tests.txt $VOL_BASE_DIR/sua-tester/
@@ -16,7 +23,7 @@
--network $NET_NAME --ip 172.18.6.200 \
-v $VOL_BASE_DIR/stp:/data \
--name ${BUILD_TAG}-stp \
-   -d $REPO_USER/osmo-stp-master
+   -d $REPO_USER/osmo-stp-$IMAGE_SUFFIX

 # start docker container with tests
 docker run --rm \
diff --git a/ttcn3-bsc-test/jenkins-sccplite.sh 
b/ttcn3-bsc-test/jenkins-sccplite.sh
index bceb0ec..e90c689 100755
--- a/ttcn3-bsc-test/jenkins-sccplite.sh
+++ b/ttcn3-bsc-test/jenkins-sccplite.sh
@@ -1,6 +1,13 @@
 #!/bin/sh

 . ../jenkins-common.sh
+[ -z "$IMAGE_SUFFIX" ] && IMAGE_SUFFIX="master"
+docker_images_require \
+   "debian-jessie-build" \
+   "osmo-bsc-$IMAGE_SUFFIX" \
+   "osmo-bts-$IMAGE_SUFFIX" \
+   "debian-stretch-titan" \
+   "ttcn3-bsc-test"

 #Make sure NET_NAME doesn't clash with the AoIP BSC test
 NET_NAME=ttcn3-bsc_sccplite-test
@@ -18,14 +25,17 @@
--network $NET_NAME --ip 172.18.12.20 \
-v $VOL_BASE_DIR/bsc:/data \
--name ${BUILD_TAG}-bsc -d \
-   $REPO_USER/osmo-bsc-master
+   $REPO_USER/osmo-bsc-$IMAGE_SUFFIX

 for i in `seq 0 2`; do
echo Starting container with OML for BTS$i
docker run  --rm \
--network $NET_NAME --ip 172.18.12.10$i \
--name ${BUILD_TAG}-bts$i -d \
-   $REPO_USER/osmo-bts-master /usr/local/bin/respawn.sh 
osmo-bts-omldummy 172.18.12.20 $((i + 1234)) 1
+   $REPO_USER/osmo-bts-$IMAGE_SUFFIX \
+   /usr/local/bin/respawn.sh \
+   osmo-bts-omldummy \
+   172.18.12.20 $((i + 1234)) 1
 done

 echo Starting container with BSC testsuite
diff --git a/ttcn3-bsc-test/jenkins.sh b/ttcn3-bsc-test/jenkins.sh
index 7536396..ed7fef2 100755
--- a/ttcn3-bsc-test/jenkins.sh
+++ b/ttcn3-bsc-test/jenkins.sh
@@ -1,6 +1,14 @@
 #!/bin/sh
 
 . ../jenkins-common.sh
+[ -z "$IMAGE_SUFFIX" ] && IMAGE_SUFFIX="master"
+docker_images_require \
+   "debian-jessie-build" \
+   "osmo-stp-$IMAGE_SUFFIX" \
+   "osmo-bsc-$IMAGE_SUFFIX" \
+   "osmo-bts-$IMAGE_SUFFIX" \
+   "debian-stretch-titan" \
+   "ttcn3-bsc-test"

 mkdir $VOL_BASE_DIR/bsc-tester
 cp BSC_Tests.cfg $VOL_BASE_DIR/bsc-tester/
@@ -18,21 +26,23 @@
--network $NET_NAME --ip 172.18.2.200 \
-v $VOL_BASE_DIR/stp:/data \
--name ${BUILD_TAG}-stp -d \
-   $REPO_USER/osmo-stp-master
+   $REPO_USER/osmo-stp-$IMAGE_SUFFIX

 echo Starting container with BSC
 docker 

Change in docker-playground[master]: symlinks: ttcn3-bsc-test-sccplite

2018-10-16 Thread osmith
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/11367


Change subject: symlinks: ttcn3-bsc-test-sccplite
..

symlinks: ttcn3-bsc-test-sccplite

Create the ttcn3-bsc-test-sccplite folder, with symlinks to
ttcn3-bsc-test/jenkins-sccplite.sh and ttcn3-bsc-test/sccplite. This
allows writing the jenkins job builder config files in a generic way.

Related: OS#3268
Change-Id: I1d1d277475090cd615a0e2d07a42b2032cdefb9c
---
A ttcn3-bsc-test-sccplite/jenkins.sh
A ttcn3-bsc-test-sccplite/sccplite
2 files changed, 2 insertions(+), 0 deletions(-)



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

diff --git a/ttcn3-bsc-test-sccplite/jenkins.sh 
b/ttcn3-bsc-test-sccplite/jenkins.sh
new file mode 12
index 000..9a6da0f
--- /dev/null
+++ b/ttcn3-bsc-test-sccplite/jenkins.sh
@@ -0,0 +1 @@
+../ttcn3-bsc-test/jenkins-sccplite.sh
\ No newline at end of file
diff --git a/ttcn3-bsc-test-sccplite/sccplite b/ttcn3-bsc-test-sccplite/sccplite
new file mode 12
index 000..9a5b492
--- /dev/null
+++ b/ttcn3-bsc-test-sccplite/sccplite
@@ -0,0 +1 @@
+../ttcn3-bsc-test/sccplite
\ No newline at end of file

--
To view, visit https://gerrit.osmocom.org/11367
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: I1d1d277475090cd615a0e2d07a42b2032cdefb9c
Gerrit-Change-Number: 11367
Gerrit-PatchSet: 1
Gerrit-Owner: osmith