Change in libosmocore[master]: LCLS: don't encode incorrect values

2019-05-10 Thread Harald Welte
Harald Welte has abandoned this change. ( https://gerrit.osmocom.org/12375 )

Change subject: LCLS: don't encode incorrect values
..


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: I9ac4bae75f5796e6e11346b8cb34d3897ae70b59
Gerrit-Change-Number: 12375
Gerrit-PatchSet: 3
Gerrit-Owner: Max 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-CC: Harald Welte 


Change in libosmocore[master]: LCLS: don't encode incorrect values

2019-01-09 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/12375 )

Change subject: LCLS: don't encode incorrect values
..


Patch Set 3: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/#/c/12375/3/src/gsm/gsm0808.c
File src/gsm/gsm0808.c:

https://gerrit.osmocom.org/#/c/12375/3/src/gsm/gsm0808.c@346
PS3, Line 346:  return NULL;
Have you seen a situation where these values were wrong / do they come from 
rx'ing packets?
If these are directly called with enum constants from our code, I wouldn't 
bother to check them.

If keeping the check:
- enums can also have negative values.
- what about the enum values in-between ST_LOCALLY_SWITCHED and _NA.



--
To view, visit https://gerrit.osmocom.org/12375
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: I9ac4bae75f5796e6e11346b8cb34d3897ae70b59
Gerrit-Change-Number: 12375
Gerrit-PatchSet: 3
Gerrit-Owner: Max 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Wed, 09 Jan 2019 16:22:54 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in libosmocore[master]: LCLS: don't encode incorrect values

2019-01-08 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/12375 )

Change subject: LCLS: don't encode incorrect values
..


Patch Set 2:

(1 comment)

Addressed in latest revision.

https://gerrit.osmocom.org/#/c/12375/1/src/gsm/gsm0808.c
File src/gsm/gsm0808.c:

https://gerrit.osmocom.org/#/c/12375/1/src/gsm/gsm0808.c@340
PS1, Line 340:  if (status >= GSM0808_LCLS_STS_NA)
> I'm not sure this is worth it. […]
Done



--
To view, visit https://gerrit.osmocom.org/12375
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: I9ac4bae75f5796e6e11346b8cb34d3897ae70b59
Gerrit-Change-Number: 12375
Gerrit-PatchSet: 2
Gerrit-Owner: Max 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Tue, 08 Jan 2019 12:51:15 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in libosmocore[master]: LCLS: don't encode incorrect values

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

Change subject: LCLS: don't encode incorrect values
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/12375
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: I9ac4bae75f5796e6e11346b8cb34d3897ae70b59
Gerrit-Change-Number: 12375
Gerrit-PatchSet: 2
Gerrit-Owner: Max 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Thu, 20 Dec 2018 11:18:14 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmocore[master]: LCLS: don't encode incorrect values

2018-12-20 Thread Max
Hello Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/12375

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

Change subject: LCLS: don't encode incorrect values
..

LCLS: don't encode incorrect values

Change-Id: I9ac4bae75f5796e6e11346b8cb34d3897ae70b59
---
M src/gsm/gsm0808.c
1 file changed, 12 insertions(+), 4 deletions(-)


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I9ac4bae75f5796e6e11346b8cb34d3897ae70b59
Gerrit-Change-Number: 12375
Gerrit-PatchSet: 2
Gerrit-Owner: Max 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-CC: Harald Welte 


Change in libosmocore[master]: LCLS: don't encode incorrect values

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

Change subject: LCLS: don't encode incorrect values
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/12375/1/src/gsm/gsm0808.c
File src/gsm/gsm0808.c:

https://gerrit.osmocom.org/#/c/12375/1/src/gsm/gsm0808.c@340
PS1, Line 340:  if (status == GSM0808_LCLS_STS_NA)
I'm not sure this is worth it.  The value can be *any* integer in most C 
compilers (particularly, gcc), and you are now checking for one invalid value, 
but not for close to 2^32 to 2^64 other invalid values...



--
To view, visit https://gerrit.osmocom.org/12375
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: I9ac4bae75f5796e6e11346b8cb34d3897ae70b59
Gerrit-Change-Number: 12375
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Wed, 19 Dec 2018 20:53:14 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in libosmocore[master]: LCLS: don't encode incorrect values

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


Change subject: LCLS: don't encode incorrect values
..

LCLS: don't encode incorrect values

Change-Id: I9ac4bae75f5796e6e11346b8cb34d3897ae70b59
---
M src/gsm/gsm0808.c
1 file changed, 12 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/75/12375/1

diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c
index 69da57d..0f9e8df 100644
--- a/src/gsm/gsm0808.c
+++ b/src/gsm/gsm0808.c
@@ -335,8 +335,12 @@
  *  \returns callee-allocated msgb with BSSMAP LCLS NOTIFICATION */
 struct msgb *gsm0808_create_lcls_conn_ctrl_ack(enum gsm0808_lcls_status status)
 {
-   struct msgb *msg = msgb_alloc_headroom(BSSMAP_MSG_SIZE, 
BSSMAP_MSG_HEADROOM,
-  "bssmap: LCLS CONN CTRL ACK");
+   struct msgb *msg;
+
+   if (status == GSM0808_LCLS_STS_NA)
+   return NULL;
+
+   msg = msgb_alloc_headroom(BSSMAP_MSG_SIZE, BSSMAP_MSG_HEADROOM, 
"bssmap: LCLS CONN CTRL ACK");
if (!msg)
return NULL;

@@ -353,8 +357,12 @@
  *  \returns callee-allocated msgb with BSSMAP LCLS NOTIFICATION */
 struct msgb *gsm0808_create_lcls_notification(enum gsm0808_lcls_status status, 
bool break_req)
 {
-   struct msgb *msg = msgb_alloc_headroom(BSSMAP_MSG_SIZE, 
BSSMAP_MSG_HEADROOM,
-  "bssmap: LCLS NOTIFICATION");
+   struct msgb *msg;
+
+   if (status == GSM0808_LCLS_STS_NA)
+   return NULL;
+
+   msg = msgb_alloc_headroom(BSSMAP_MSG_SIZE, BSSMAP_MSG_HEADROOM, 
"bssmap: LCLS NOTIFICATION");
if (!msg)
return NULL;


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