Re: [sr-dev] [kamailio/kamailio] websocket: check bounds before reading mask (#1413)

2018-01-25 Thread Daniel-Constantin Mierla
Merged #1413.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1413#event-1443116878___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] websocket: check bounds before reading mask (#1413)

2018-01-25 Thread Daniel-Constantin Mierla
Thanks!

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1413#issuecomment-360708175___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:038c3f16: Merge pull request #1413 from armenb/ws_check_bounds_before_reading_mask

2018-01-25 Thread GitHub
Module: kamailio
Branch: master
Commit: 038c3f16d9a8371f00b1b8e34d37d6509465a471
URL: 
https://github.com/kamailio/kamailio/commit/038c3f16d9a8371f00b1b8e34d37d6509465a471

Author: Daniel-Constantin Mierla 
Committer: GitHub 
Date: 2018-01-26T08:50:54+01:00

Merge pull request #1413 from armenb/ws_check_bounds_before_reading_mask

websocket: check bounds before reading mask

---

Modified: src/modules/websocket/ws_frame.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/038c3f16d9a8371f00b1b8e34d37d6509465a471.diff
Patch: 
https://github.com/kamailio/kamailio/commit/038c3f16d9a8371f00b1b8e34d37d6509465a471.patch

---

diff --git a/src/modules/websocket/ws_frame.c b/src/modules/websocket/ws_frame.c
index 2739ecbc11..2d7ca8ec5a 100644
--- a/src/modules/websocket/ws_frame.c
+++ b/src/modules/websocket/ws_frame.c
@@ -470,13 +470,6 @@ static int decode_and_validate_ws_frame(ws_frame_t *frame,
} else
mask_start = 2;
 
-   /* Decode mask */
-   frame->masking_key[0] = (buf[mask_start + 0] & 0xff);
-   frame->masking_key[1] = (buf[mask_start + 1] & 0xff);
-   frame->masking_key[2] = (buf[mask_start + 2] & 0xff);
-   frame->masking_key[3] = (buf[mask_start + 3] & 0xff);
-
-   /* Decode and unmask payload */
if((unsigned long long)len
!= (unsigned long long)frame->payload_len + mask_start 
+ 4) {
LM_WARN("message not complete frame size %u but received %u\n",
@@ -492,7 +485,15 @@ static int decode_and_validate_ws_frame(ws_frame_t *frame,
*err_text = str_status_message_too_big;
return -1;
}
+   /* Decode mask */
+   frame->masking_key[0] = (buf[mask_start + 0] & 0xff);
+   frame->masking_key[1] = (buf[mask_start + 1] & 0xff);
+   frame->masking_key[2] = (buf[mask_start + 2] & 0xff);
+   frame->masking_key[3] = (buf[mask_start + 3] & 0xff);
+
frame->payload_data = &buf[mask_start + 4];
+
+   /* Decode and unmask payload */
for(i = 0; i < frame->payload_len; i++) {
j = i % 4;
frame->payload_data[i] = frame->payload_data[i] ^ 
frame->masking_key[j];


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] websocket: handle unrecognized subprotocol better (#1412)

2018-01-25 Thread Daniel-Constantin Mierla
Merged #1412.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1412#event-1443116352___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:4fabe253: websocket: check bounds before reading mask

2018-01-25 Thread Armen Babikyan
Module: kamailio
Branch: master
Commit: 4fabe253a1eb0f9b494521cfa98365523a93adcf
URL: 
https://github.com/kamailio/kamailio/commit/4fabe253a1eb0f9b494521cfa98365523a93adcf

Author: Armen Babikyan 
Committer: Armen Babikyan 
Date: 2018-01-25T17:43:33-08:00

websocket: check bounds before reading mask

---

Modified: src/modules/websocket/ws_frame.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/4fabe253a1eb0f9b494521cfa98365523a93adcf.diff
Patch: 
https://github.com/kamailio/kamailio/commit/4fabe253a1eb0f9b494521cfa98365523a93adcf.patch

---

diff --git a/src/modules/websocket/ws_frame.c b/src/modules/websocket/ws_frame.c
index 9bc3268601..32a1f4bf6a 100644
--- a/src/modules/websocket/ws_frame.c
+++ b/src/modules/websocket/ws_frame.c
@@ -470,13 +470,6 @@ static int decode_and_validate_ws_frame(ws_frame_t *frame,
} else
mask_start = 2;
 
-   /* Decode mask */
-   frame->masking_key[0] = (buf[mask_start + 0] & 0xff);
-   frame->masking_key[1] = (buf[mask_start + 1] & 0xff);
-   frame->masking_key[2] = (buf[mask_start + 2] & 0xff);
-   frame->masking_key[3] = (buf[mask_start + 3] & 0xff);
-
-   /* Decode and unmask payload */
if((unsigned long long)len
!= (unsigned long long)frame->payload_len + mask_start 
+ 4) {
LM_WARN("message not complete frame size %u but received %u\n",
@@ -492,7 +485,15 @@ static int decode_and_validate_ws_frame(ws_frame_t *frame,
*err_text = str_status_message_too_big;
return -1;
}
+   /* Decode mask */
+   frame->masking_key[0] = (buf[mask_start + 0] & 0xff);
+   frame->masking_key[1] = (buf[mask_start + 1] & 0xff);
+   frame->masking_key[2] = (buf[mask_start + 2] & 0xff);
+   frame->masking_key[3] = (buf[mask_start + 3] & 0xff);
+
frame->payload_data = &buf[mask_start + 4];
+
+   /* Decode and unmask payload */
for(i = 0; i < frame->payload_len; i++) {
j = i % 4;
frame->payload_data[i] = frame->payload_data[i] ^ 
frame->masking_key[j];


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] websocket: handle unrecognized subprotocol better (#1412)

2018-01-25 Thread Daniel-Constantin Mierla
Thanks!

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1412#issuecomment-360708077___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:91c38814: websocket: handle unrecognized subprotocol better

2018-01-25 Thread Armen Babikyan
Module: kamailio
Branch: master
Commit: 91c388147a9328743582a92c6f1184141aa268fb
URL: 
https://github.com/kamailio/kamailio/commit/91c388147a9328743582a92c6f1184141aa268fb

Author: Armen Babikyan 
Committer: Armen Babikyan 
Date: 2018-01-25T17:20:35-08:00

websocket: handle unrecognized subprotocol better

---

Modified: src/modules/websocket/ws_frame.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/91c388147a9328743582a92c6f1184141aa268fb.diff
Patch: 
https://github.com/kamailio/kamailio/commit/91c388147a9328743582a92c6f1184141aa268fb.patch

---

diff --git a/src/modules/websocket/ws_frame.c b/src/modules/websocket/ws_frame.c
index 9bc3268601..2739ecbc11 100644
--- a/src/modules/websocket/ws_frame.c
+++ b/src/modules/websocket/ws_frame.c
@@ -678,6 +678,9 @@ int ws_frame_receive(sr_event_param_t *evp)
 
return -1;
}
+   } else {
+   LM_ERR("Unrecognized WebSocket subprotocol: 
%u\n", frame.wsc->sub_protocol);
+   return -1;
}
 
case OPCODE_CLOSE:


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:9811e318: Merge pull request #1412 from armenb/ws_cid85650_fix

2018-01-25 Thread GitHub
Module: kamailio
Branch: master
Commit: 9811e318359b3099c3b1d7dff3673b642f8ccd0a
URL: 
https://github.com/kamailio/kamailio/commit/9811e318359b3099c3b1d7dff3673b642f8ccd0a

Author: Daniel-Constantin Mierla 
Committer: GitHub 
Date: 2018-01-26T08:50:16+01:00

Merge pull request #1412 from armenb/ws_cid85650_fix

websocket: handle unrecognized subprotocol better

---

Modified: src/modules/websocket/ws_frame.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/9811e318359b3099c3b1d7dff3673b642f8ccd0a.diff
Patch: 
https://github.com/kamailio/kamailio/commit/9811e318359b3099c3b1d7dff3673b642f8ccd0a.patch

---

diff --git a/src/modules/websocket/ws_frame.c b/src/modules/websocket/ws_frame.c
index 9bc3268601..2739ecbc11 100644
--- a/src/modules/websocket/ws_frame.c
+++ b/src/modules/websocket/ws_frame.c
@@ -678,6 +678,9 @@ int ws_frame_receive(sr_event_param_t *evp)
 
return -1;
}
+   } else {
+   LM_ERR("Unrecognized WebSocket subprotocol: 
%u\n", frame.wsc->sub_protocol);
+   return -1;
}
 
case OPCODE_CLOSE:


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:595b8fe0: ims_usrloc_scscf: missing assignment of record_route

2018-01-25 Thread Christoph Valentin
Module: kamailio
Branch: master
Commit: 595b8fe06165328366865328e43c14a9ca23c386
URL: 
https://github.com/kamailio/kamailio/commit/595b8fe06165328366865328e43c14a9ca23c386

Author: Christoph Valentin 
Committer: Christoph Valentin 
Date: 2018-01-25T13:37:59+01:00

ims_usrloc_scscf: missing assignment of record_route

In update_subscriber() function, when the rs is assigned to the subs,
it is missing the record_route component, which leads to core dump in
some scenarios.

---

Modified: src/modules/ims_usrloc_scscf/subscribe.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/595b8fe06165328366865328e43c14a9ca23c386.diff
Patch: 
https://github.com/kamailio/kamailio/commit/595b8fe06165328366865328e43c14a9ca23c386.patch

---

diff --git a/src/modules/ims_usrloc_scscf/subscribe.c 
b/src/modules/ims_usrloc_scscf/subscribe.c
index 227d06d51a..a5bdf699d5 100644
--- a/src/modules/ims_usrloc_scscf/subscribe.c
+++ b/src/modules/ims_usrloc_scscf/subscribe.c
@@ -346,6 +346,7 @@ int update_subscriber(impurecord_t* urec, reg_subscriber** 
_reg_subscriber, int
 subs.callid = rs->call_id;
 subs.expires = rs->expires - act_time;
 subs.contact = rs->watcher_contact;
+subs.record_route = rs->record_route;
 
 hash_code = core_hash(&subs.callid, &subs.to_tag, sub_dialog_hash_size);
 


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:11c179ab: ims_usrloc_scscf: assignment of length missing for query_buffer in

2018-01-25 Thread Christoph Valentin
Module: kamailio
Branch: master
Commit: 11c179ab23f1c78f19557032afd49bef7324
URL: 
https://github.com/kamailio/kamailio/commit/11c179ab23f1c78f19557032afd49bef7324

Author: Christoph Valentin 
Committer: Christoph Valentin 
Date: 2018-01-25T13:13:07+01:00

ims_usrloc_scscf: assignment of length missing for query_buffer in
db_link_contact_to_impu()

When writing to query_buffer with the help of the snprintf() function,
the result of the functio is written to variable query_buffer_len
instead of to the query_buffer.len itself. This leads to core dump
in some cases. Replaced "_" by "." in "query_buffer_len ="

---

Modified: src/modules/ims_usrloc_scscf/usrloc_db.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/11c179ab23f1c78f19557032afd49bef7324.diff
Patch: 
https://github.com/kamailio/kamailio/commit/11c179ab23f1c78f19557032afd49bef7324.patch

---

diff --git a/src/modules/ims_usrloc_scscf/usrloc_db.c 
b/src/modules/ims_usrloc_scscf/usrloc_db.c
index e1a7d4287e..b5301e0a3b 100644
--- a/src/modules/ims_usrloc_scscf/usrloc_db.c
+++ b/src/modules/ims_usrloc_scscf/usrloc_db.c
@@ -1079,7 +1079,7 @@ int db_link_contact_to_impu(impurecord_t* _r, ucontact_t* 
_c) {
 
 }
 
-query_buffer_len = snprintf(query_buffer.s, query_buffer_len, 
impu_contact_insert_query, _r->public_identity.len, _r->public_identity.s, 
_c->c.len, _c->c.s);
+query_buffer.len = snprintf(query_buffer.s, query_buffer_len, 
impu_contact_insert_query, _r->public_identity.len, _r->public_identity.s, 
_c->c.len, _c->c.s);
 
 LM_DBG("QUERY IS [%.*s] and len is %d\n", query_buffer.len, 
query_buffer.s, query_buffer.len);
 if (ul_dbf.raw_query(ul_dbh, &query_buffer, &rs) != 0) {


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:1caf97ee: usrloc: proper condition when using rm_expired_delay

2018-01-25 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 1caf97eee90fa5711b60f5cb7bf3a21a0144d4b6
URL: 
https://github.com/kamailio/kamailio/commit/1caf97eee90fa5711b60f5cb7bf3a21a0144d4b6

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2018-01-26T08:41:19+01:00

usrloc: proper condition when using rm_expired_delay

---

Modified: src/modules/usrloc/udomain.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/1caf97eee90fa5711b60f5cb7bf3a21a0144d4b6.diff
Patch: 
https://github.com/kamailio/kamailio/commit/1caf97eee90fa5711b60f5cb7bf3a21a0144d4b6.patch

---

diff --git a/src/modules/usrloc/udomain.c b/src/modules/usrloc/udomain.c
index a3d948ad0b..8f5bfe3061 100644
--- a/src/modules/usrloc/udomain.c
+++ b/src/modules/usrloc/udomain.c
@@ -902,7 +902,7 @@ int db_timer_udomain(udomain_t* _d)
keys[0] = &expires_col;
ops[0] = "<";
vals[0].nul = 0;
-   UL_DB_EXPIRES_SET(&vals[0], act_time + 1 + ul_rm_expired_delay);
+   UL_DB_EXPIRES_SET(&vals[0], act_time + 1 - ul_rm_expired_delay);
 
keys[1] = &expires_col;
ops[1] = OP_NEQ;


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio/kamailio] websocket: check bounds before reading mask (#1413)

2018-01-25 Thread Armen Babikyan




 Pre-Submission Checklist



- [ ] Commit message has the format required by CONTRIBUTING guide
- [ ] Commits are split per component (core, individual modules, libs, utils, 
...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] No commits to README files for modules (changes must be done to docbook 
files
in `doc/` subfolder, the README file is autogenerated)

 Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)

 Checklist:

- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
- [ ] Related to issue # (replace  with an open issue number)

 Description


You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/1413

-- Commit Summary --

  * websocket: check bounds before reading mask

-- File Changes --

M src/modules/websocket/ws_frame.c (15)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/1413.patch
https://github.com/kamailio/kamailio/pull/1413.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1413
___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio/kamailio] websocket: handle unrecognized subprotocol better (#1412)

2018-01-25 Thread Armen Babikyan




 Pre-Submission Checklist



- [ ] Commit message has the format required by CONTRIBUTING guide
- [ ] Commits are split per component (core, individual modules, libs, utils, 
...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] No commits to README files for modules (changes must be done to docbook 
files
in `doc/` subfolder, the README file is autogenerated)

 Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)

 Checklist:

- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
- [ ] Related to issue # (replace  with an open issue number)

 Description


You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/1412

-- Commit Summary --

  * websocket: handle unrecognized subprotocol better

-- File Changes --

M src/modules/websocket/ws_frame.c (3)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/1412.patch
https://github.com/kamailio/kamailio/pull/1412.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1412
___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:f3064c68: modules: readme files regenerated - presence ... [skip ci]

2018-01-25 Thread Kamailio Dev
Module: kamailio
Branch: master
Commit: f3064c6825840868ccfd4340d9bb6533e5842f67
URL: 
https://github.com/kamailio/kamailio/commit/f3064c6825840868ccfd4340d9bb6533e5842f67

Author: Kamailio Dev 
Committer: Kamailio Dev 
Date: 2018-01-25T19:46:34+01:00

modules: readme files regenerated - presence ... [skip ci]

---

Modified: src/modules/presence/README

---

Diff:  
https://github.com/kamailio/kamailio/commit/f3064c6825840868ccfd4340d9bb6533e5842f67.diff
Patch: 
https://github.com/kamailio/kamailio/commit/f3064c6825840868ccfd4340d9bb6533e5842f67.patch


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] presence: dmq integration (#1402)

2018-01-25 Thread Charles Chance
Merged #1402.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1402#event-1442248890___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:67bc67c5: Merge pull request #1402 from kamailio/cchance/presence_dmq

2018-01-25 Thread GitHub
Module: kamailio
Branch: master
Commit: 67bc67c5487f29b6771d07ddd9e45cad5da46d43
URL: 
https://github.com/kamailio/kamailio/commit/67bc67c5487f29b6771d07ddd9e45cad5da46d43

Author: Charles Chance 
Committer: GitHub 
Date: 2018-01-25T18:39:28Z

Merge pull request #1402 from kamailio/cchance/presence_dmq

presence: dmq integration

---

Added: src/modules/presence/presence_dmq.c
Added: src/modules/presence/presence_dmq.h
Modified: src/lib/srdb1/schema/pr_presentity.xml
Modified: src/modules/dmq/dmq.c
Modified: src/modules/dmq/dmqnode.c
Modified: src/modules/dmq/dmqnode.h
Modified: src/modules/presence/Makefile
Modified: src/modules/presence/doc/presence_admin.xml
Modified: src/modules/presence/notify.c
Modified: src/modules/presence/notify.h
Modified: src/modules/presence/presence.c
Modified: src/modules/presence/presence.h
Modified: src/modules/presence/presentity.c
Modified: src/modules/presence/presentity.h
Modified: src/modules/presence/publish.c
Modified: utils/kamctl/db_berkeley/kamailio/presentity
Modified: utils/kamctl/db_berkeley/kamailio/version
Modified: utils/kamctl/db_sqlite/presence-create.sql
Modified: utils/kamctl/dbtext/kamailio/presentity
Modified: utils/kamctl/dbtext/kamailio/version
Modified: utils/kamctl/mongodb/kamailio/presentity.json
Modified: utils/kamctl/mongodb/kamailio/version-create.mongo
Modified: utils/kamctl/mysql/presence-create.sql
Modified: utils/kamctl/oracle/presence-create.sql
Modified: utils/kamctl/postgres/presence-create.sql
Modified: utils/kamctl/xhttp_pi/pi_framework.xml
Modified: utils/kamctl/xhttp_pi/presence-mod
Modified: utils/kamctl/xhttp_pi/presence-table

---

Diff:  
https://github.com/kamailio/kamailio/commit/67bc67c5487f29b6771d07ddd9e45cad5da46d43.diff
Patch: 
https://github.com/kamailio/kamailio/commit/67bc67c5487f29b6771d07ddd9e45cad5da46d43.patch


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:3fc1da64: presence: added enable_dmq parameter to module docs

2018-01-25 Thread Charles Chance
Module: kamailio
Branch: master
Commit: 3fc1da644a6b375fc45ea17cbcf81643f70db545
URL: 
https://github.com/kamailio/kamailio/commit/3fc1da644a6b375fc45ea17cbcf81643f70db545

Author: Charles Chance 
Committer: Charles Chance 
Date: 2018-01-24T14:21:30Z

presence: added enable_dmq parameter to module docs

---

Modified: src/modules/presence/doc/presence_admin.xml

---

Diff:  
https://github.com/kamailio/kamailio/commit/3fc1da644a6b375fc45ea17cbcf81643f70db545.diff
Patch: 
https://github.com/kamailio/kamailio/commit/3fc1da644a6b375fc45ea17cbcf81643f70db545.patch

---

diff --git a/src/modules/presence/doc/presence_admin.xml 
b/src/modules/presence/doc/presence_admin.xml
index 0bedc37741..aa10dff34c 100644
--- a/src/modules/presence/doc/presence_admin.xml
+++ b/src/modules/presence/doc/presence_admin.xml
@@ -62,6 +62,11 @@
tm.


+   
+   
+   dmq (only if replication is 
enabled).
+   
+   



@@ -897,6 +902,33 @@ modparam("presence", "retrieve_order_by", "priority, 
received_time")
 
 
 
+
+   enable_dmq (integer)
+   
+   If set to 1, will enable DMQ replication of presentities 
between nodes. Use this instead of a shared DB
+   to share state across a cluster and update local watchers in 
realtime (subs_db_mode < 3) or on next
+   notifier run (subs_db_mode = 3).
+   
+   
+   
+   If this parameter is enabled, the DMQ module must be 
loaded first - otherwise, startup will fail.
+   
+   
+   
+   
+   Default value is 0.
+   
+   
+   
+   Set enable_dmq parameter
+   
+   ...
+   modparam("presence", "enable_dmq", 1)
+   ...
+   
+   
+
+
 
 
 


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:a4034c1d: kamctl: regenerated db scripts to include presentity ruid column

2018-01-25 Thread Charles Chance
Module: kamailio
Branch: master
Commit: a4034c1d087b1c87f4dd712554a2a6f6fa184d86
URL: 
https://github.com/kamailio/kamailio/commit/a4034c1d087b1c87f4dd712554a2a6f6fa184d86

Author: Charles Chance 
Committer: Charles Chance 
Date: 2018-01-24T14:20:53Z

kamctl: regenerated db scripts to include presentity ruid column

---

Modified: utils/kamctl/db_berkeley/kamailio/presentity
Modified: utils/kamctl/db_berkeley/kamailio/version
Modified: utils/kamctl/db_sqlite/presence-create.sql
Modified: utils/kamctl/dbtext/kamailio/presentity
Modified: utils/kamctl/dbtext/kamailio/version
Modified: utils/kamctl/mongodb/kamailio/presentity.json
Modified: utils/kamctl/mongodb/kamailio/version-create.mongo
Modified: utils/kamctl/mysql/presence-create.sql
Modified: utils/kamctl/oracle/presence-create.sql
Modified: utils/kamctl/postgres/presence-create.sql
Modified: utils/kamctl/xhttp_pi/pi_framework.xml
Modified: utils/kamctl/xhttp_pi/presence-mod
Modified: utils/kamctl/xhttp_pi/presence-table

---

Diff:  
https://github.com/kamailio/kamailio/commit/a4034c1d087b1c87f4dd712554a2a6f6fa184d86.diff
Patch: 
https://github.com/kamailio/kamailio/commit/a4034c1d087b1c87f4dd712554a2a6f6fa184d86.patch


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:acd42263: schema: add ruid column to presentity table

2018-01-25 Thread Charles Chance
Module: kamailio
Branch: master
Commit: acd42263ea1e648f2f5789f993a63de1f05f8b1b
URL: 
https://github.com/kamailio/kamailio/commit/acd42263ea1e648f2f5789f993a63de1f05f8b1b

Author: Charles Chance 
Committer: Charles Chance 
Date: 2018-01-24T14:19:20Z

schema: add ruid column to presentity table

---

Modified: src/lib/srdb1/schema/pr_presentity.xml

---

Diff:  
https://github.com/kamailio/kamailio/commit/acd42263ea1e648f2f5789f993a63de1f05f8b1b.diff
Patch: 
https://github.com/kamailio/kamailio/commit/acd42263ea1e648f2f5789f993a63de1f05f8b1b.patch

---

diff --git a/src/lib/srdb1/schema/pr_presentity.xml 
b/src/lib/srdb1/schema/pr_presentity.xml
index c994a62c9c..3d525f7f92 100644
--- a/src/lib/srdb1/schema/pr_presentity.xml
+++ b/src/lib/srdb1/schema/pr_presentity.xml
@@ -9,7 +9,7 @@
 
 http://docbook.org/ns/docbook";>
 presentity
-4
+5
 &MYSQL_TABLE_TYPE;
 

@@ -98,6 +98,14 @@
 Priority of the record

 
+
+ruid
+string
+64
+
+Record internal unique id
+
+
 
 presentity_idx
 
@@ -107,6 +115,12 @@
 
 
 
+
+ruid_idx
+
+
+
+
 
 presentity_expires
 


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:b7a5016c: presence: dmq integration

2018-01-25 Thread Charles Chance
Module: kamailio
Branch: master
Commit: b7a5016cdbdb068fe23dc1a5d74aa01643c8ec20
URL: 
https://github.com/kamailio/kamailio/commit/b7a5016cdbdb068fe23dc1a5d74aa01643c8ec20

Author: Charles Chance 
Committer: Charles Chance 
Date: 2018-01-24T14:17:37Z

presence: dmq integration

- initial implementation
- replication of presentity updates over DMQ
- adds ruid column for matching across cluster

---

Added: src/modules/presence/presence_dmq.c
Added: src/modules/presence/presence_dmq.h
Modified: src/modules/dmq/dmq.c
Modified: src/modules/dmq/dmqnode.c
Modified: src/modules/dmq/dmqnode.h
Modified: src/modules/presence/Makefile
Modified: src/modules/presence/notify.c
Modified: src/modules/presence/notify.h
Modified: src/modules/presence/presence.c
Modified: src/modules/presence/presence.h
Modified: src/modules/presence/presentity.c
Modified: src/modules/presence/presentity.h
Modified: src/modules/presence/publish.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/b7a5016cdbdb068fe23dc1a5d74aa01643c8ec20.diff
Patch: 
https://github.com/kamailio/kamailio/commit/b7a5016cdbdb068fe23dc1a5d74aa01643c8ec20.patch


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] presence: dmq integration (#1402)

2018-01-25 Thread Charles Chance
Merging now, having received no further comments from devs. Any issues, please 
raise in the usual manner.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1402#issuecomment-360558922___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] ims_usrloc_scscf: missing assignment of record_route (#1410)

2018-01-25 Thread ng-voice GmbH
Merged #1410.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1410#event-1441931210___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:97fd1100: Merge pull request #1410 from christoph-v/missing_record_route_assignment

2018-01-25 Thread GitHub
Module: kamailio
Branch: master
Commit: 97fd1100b0bb4a33ad010d270404c25b3849873b
URL: 
https://github.com/kamailio/kamailio/commit/97fd1100b0bb4a33ad010d270404c25b3849873b

Author: ng-voice GmbH 
Committer: GitHub 
Date: 2018-01-25T16:58:26+01:00

Merge pull request #1410 from christoph-v/missing_record_route_assignment

ims_usrloc_scscf: missing assignment of record_route

---

Modified: src/modules/ims_usrloc_scscf/subscribe.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/97fd1100b0bb4a33ad010d270404c25b3849873b.diff
Patch: 
https://github.com/kamailio/kamailio/commit/97fd1100b0bb4a33ad010d270404c25b3849873b.patch

---

diff --git a/src/modules/ims_usrloc_scscf/subscribe.c 
b/src/modules/ims_usrloc_scscf/subscribe.c
index 227d06d51a..a5bdf699d5 100644
--- a/src/modules/ims_usrloc_scscf/subscribe.c
+++ b/src/modules/ims_usrloc_scscf/subscribe.c
@@ -346,6 +346,7 @@ int update_subscriber(impurecord_t* urec, reg_subscriber** 
_reg_subscriber, int
 subs.callid = rs->call_id;
 subs.expires = rs->expires - act_time;
 subs.contact = rs->watcher_contact;
+subs.record_route = rs->record_route;
 
 hash_code = core_hash(&subs.callid, &subs.to_tag, sub_dialog_hash_size);
 


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] ims_usrloc_scscf: assignment of length missing for query_buffer in db_link_contact_to_impu() (#1411)

2018-01-25 Thread ng-voice GmbH
Merged #1411.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1411#event-1441930040___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:6d67bf0e: Merge pull request #1411 from christoph-v/wrong_query_buffer_assignment

2018-01-25 Thread GitHub
Module: kamailio
Branch: master
Commit: 6d67bf0ed3451fa16bf98d0984af85f25c4c1b56
URL: 
https://github.com/kamailio/kamailio/commit/6d67bf0ed3451fa16bf98d0984af85f25c4c1b56

Author: ng-voice GmbH 
Committer: GitHub 
Date: 2018-01-25T16:57:56+01:00

Merge pull request #1411 from christoph-v/wrong_query_buffer_assignment

ims_usrloc_scscf: assignment of length missing for query_buffer in 
db_link_contact_to_impu()

---

Modified: src/modules/ims_usrloc_scscf/usrloc_db.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/6d67bf0ed3451fa16bf98d0984af85f25c4c1b56.diff
Patch: 
https://github.com/kamailio/kamailio/commit/6d67bf0ed3451fa16bf98d0984af85f25c4c1b56.patch

---

diff --git a/src/modules/ims_usrloc_scscf/usrloc_db.c 
b/src/modules/ims_usrloc_scscf/usrloc_db.c
index e1a7d4287e..b5301e0a3b 100644
--- a/src/modules/ims_usrloc_scscf/usrloc_db.c
+++ b/src/modules/ims_usrloc_scscf/usrloc_db.c
@@ -1079,7 +1079,7 @@ int db_link_contact_to_impu(impurecord_t* _r, ucontact_t* 
_c) {
 
 }
 
-query_buffer_len = snprintf(query_buffer.s, query_buffer_len, 
impu_contact_insert_query, _r->public_identity.len, _r->public_identity.s, 
_c->c.len, _c->c.s);
+query_buffer.len = snprintf(query_buffer.s, query_buffer_len, 
impu_contact_insert_query, _r->public_identity.len, _r->public_identity.s, 
_c->c.len, _c->c.s);
 
 LM_DBG("QUERY IS [%.*s] and len is %d\n", query_buffer.len, 
query_buffer.s, query_buffer.len);
 if (ul_dbf.raw_query(ul_dbh, &query_buffer, &rs) != 0) {


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] json_pua: new module (#1408)

2018-01-25 Thread Emmanuel Schmidbauer
I completely agree with all of your suggestions -- but most those changes will 
take me some time to implement. I'll close this PR for now

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1408#issuecomment-360492951___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] json_pua: new module (#1408)

2018-01-25 Thread Emmanuel Schmidbauer
Closed #1408.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1408#event-1441813863___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] Fosdem dinner

2018-01-25 Thread Dragos Oancea
I will be coming too, thank you ! 



  From: Daniel-Constantin Mierla 
 To: Kamailio (SER) - Devel Mailing List ; Kamailio 
(SER) - Users Mailing List ; 
"busin...@lists.kamailio.org"  
 Sent: Thursday, January 25, 2018 9:43 AM
 Subject: Re: [sr-dev] Fosdem dinner
   
Hello,

we have to do the reservation soon, therefore I am sending a reminder
for who plans to attend but hasn't announced it yet: do it asap,
otherwise there might not be enough seats to accommodate you.

Also, if you announced your participation, but something changed, like
how many persons are coming with you, notify us quickly.

Like at the past similar events at Fosdem, each participant pays for
herself/himself, we just arrange for a place where to go together and
enjoy the evening.

Cheers,
Daniel

On 15.01.18 09:28, Daniel-Constantin Mierla wrote:
> Hello,
>
> in the past 10 years or so, many of us met at Fosdem conference in
> Brussels (the edition this year happens during February 3-4) and had a
> dinner on Saturday evening. I know already couple of people from
> community that will go there, so the question is if there is any
> interest to organize again such event.
>
> If yes, it will be again on Saturday, on the evening of the 3rd of February.
>
> At the past editions, it turned into an all-RTC dinner, but we can
> consider to have it alone again (eventually with few other invited
> friends), if there are too many or people want a smaller meeting.
>
> Reply this week if you want to join, so we can estimate how many seats
> we need and have enough time to find a place that can accommodate us.
>
> More about Fosdem can be found at:
>
>   - https://fosdem.org
>
> There is a devroom on Sunday with topics covering real time
> communications. I will have a presentation there.
>
> Cheers,
> Daniel
>

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - March 5-7, 2018, Berlin - www.asipto.com
Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


   ___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] pua: removed null pointer access from subscribe_cbparam() (#1409)

2018-01-25 Thread Daniel-Constantin Mierla
Done in master, I will backport soon.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1409#issuecomment-360475613___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] pua: removed null pointer access from subscribe_cbparam() (#1409)

2018-01-25 Thread Daniel-Constantin Mierla
Closed #1409.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1409#event-1441691504___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:cda1d086: pua: proper safety check on subs->extra_headers->s for subscribe_cbparam()

2018-01-25 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: cda1d086c164052a5b79b54a8d0e5cf6e5fb3e1c
URL: 
https://github.com/kamailio/kamailio/commit/cda1d086c164052a5b79b54a8d0e5cf6e5fb3e1c

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2018-01-25T15:03:27+01:00

pua: proper safety check on subs->extra_headers->s for subscribe_cbparam()

- dicovered via GH PR #1409

---

Modified: src/modules/pua/send_subscribe.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/cda1d086c164052a5b79b54a8d0e5cf6e5fb3e1c.diff
Patch: 
https://github.com/kamailio/kamailio/commit/cda1d086c164052a5b79b54a8d0e5cf6e5fb3e1c.patch

---

diff --git a/src/modules/pua/send_subscribe.c b/src/modules/pua/send_subscribe.c
index b75290b936..254e77e7fd 100644
--- a/src/modules/pua/send_subscribe.c
+++ b/src/modules/pua/send_subscribe.c
@@ -821,7 +821,7 @@ ua_pres_t* subscribe_cbparam(subs_info_t* subs, int ua_flag)
{
CONT_COPY(hentity, hentity->id, subs->id);
}
-   if(subs->extra_headers && hentity->extra_headers->s)
+   if(subs->extra_headers && subs->extra_headers->s)
{
hentity->extra_headers= (str*)((char*)hentity+ size);
size+= sizeof(str);


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] pua: removed null pointer access from subscribe_cbparam() (#1409)

2018-01-25 Thread Christoph VALENTIN
Hi,

Can you do it the way you proposed? I’d have to create a new branch for this 
anyway.

KR

From: Daniel-Constantin Mierla [mailto:notificati...@github.com]
Sent: Thursday, January 25, 2018 2:46 PM
To: kamailio/kamailio 
Cc: Valentin Christoph ; Author 

Subject: Re: [kamailio/kamailio] pua: removed null pointer access from 
subscribe_cbparam() (#1409)


Thanks for finding this, looks like a copy&paste issue, so I think the 
condition should not be removed but fixed -- instead of:

if(subs->extra_headers && hentity->extra_headers->s)

There should be:

if(subs->extra_headers && subst->extra_headers->s)

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on 
GitHub, 
or mute the 
thread.



The information contained in this e-mail message is privileged and confidential 
and is for the exclusive use of the addressee. The person who receives this 
message and who is not the addressee, one of his employees or an agent entitled 
to hand it over to the addressee, is informed that he may not use, disclose or 
reproduce the contents thereof, and is kindly asked to notify the sender and 
delete the e-mail immediately.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1409#issuecomment-360471259___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] pua: removed null pointer access from subscribe_cbparam() (#1409)

2018-01-25 Thread Daniel-Constantin Mierla
Thanks for finding this, looks like a copy&paste issue, so I think the 
condition should not be removed but fixed -- instead of:

```
if(subs->extra_headers && hentity->extra_headers->s)
```

There should be:

```
if(subs->extra_headers && subst->extra_headers->s)
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1409#issuecomment-360470585___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio/kamailio] ims_usrloc_scscf: assignment of length missing for query_buffer in db_link_contact_to_impu() (#1411)

2018-01-25 Thread Christoph VALENTIN
When writing to query_buffer with the help of the snprintf() function,
the result of the functio is written to variable query_buffer_len
instead of to the query_buffer.len itself. This leads to core dump
in some cases. Replaced "_" by "." in "query_buffer_len ="





 Pre-Submission Checklist



- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, 
...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook 
files
in `doc/` subfolder, the README file is autogenerated)

 Type Of Change
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)

 Checklist:

- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue # (replace  with an open issue number)

 Description

When linking a Contact to an IMPU during SIP REGISTER in S-CSCF, a core dump 
can happen due to missing assignment of length to query_buffer.
Added the assignment. 

You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/1411

-- Commit Summary --

  * ims_usrloc_scscf: assignment of length missing for query_buffer in

-- File Changes --

M src/modules/ims_usrloc_scscf/usrloc_db.c (2)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/1411.patch
https://github.com/kamailio/kamailio/pull/1411.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1411
___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio/kamailio] ims_usrloc_scscf: missing assignment of record_route (#1410)

2018-01-25 Thread Christoph VALENTIN
In update_subscriber() function, when the rs is assigned to the subs,
it is missing the record_route component, which leads to core dump in
some scenarios.





 Pre-Submission Checklist



- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, 
...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook 
files
in `doc/` subfolder, the README file is autogenerated)

 Type Of Change
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)

 Checklist:

- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue # (replace  with an open issue number)

 Description

Without this bugfix, a core dump can happen during SIP REGISTER in S-CSCF.
Reason: the record_route component was forgotten to be assigned when assigning 
rs to Subs in the update_subscriber() function.
This assignment was added.

You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/1410

-- Commit Summary --

  * ims_usrloc_scscf: missing assignment of record_route

-- File Changes --

M src/modules/ims_usrloc_scscf/subscribe.c (1)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/1410.patch
https://github.com/kamailio/kamailio/pull/1410.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1410
___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio/kamailio] pua: removed null pointer access from subscribe_cbparam() (#1409)

2018-01-25 Thread Christoph VALENTIN
A newly introduced condition in an if () statement leads to core
dump in some scenarios. It is removed.





 Pre-Submission Checklist



- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, 
...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook 
files
in `doc/` subfolder, the README file is autogenerated)

 Type Of Change
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)

 Checklist:

- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue # (replace  with an open issue number)

 Description

Without this Change a core dump happens in the P-CSCF during handling the SIP 
REGISTER.
Obviously a condition was added to an if() Statement, which itself created a 
null pointer Access.
This additional Statement was removed.

You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/1409

-- Commit Summary --

  * pua: removed null pointer access from subscribe_cbparam()

-- File Changes --

M src/modules/pua/send_subscribe.c (2)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/1409.patch
https://github.com/kamailio/kamailio/pull/1409.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1409
___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] Errored: kamailio/kamailio#5427 (master - 3ebf070)

2018-01-25 Thread Travis CI
Build Update for kamailio/kamailio
-

Build: #5427
Status: Errored

Duration: 10 minutes and 52 seconds
Commit: 3ebf070 (master)
Author: Victor Seva
Message: pkg/kamailio/deb: version set to 5.2.0~dev3

View the changeset: 
https://github.com/kamailio/kamailio/compare/0aa43efe604c...3ebf070467ae

View the full build log and details: 
https://travis-ci.org/kamailio/kamailio/builds/333184928?utm_source=email&utm_medium=notification

--

You can configure recipients for build notifications in your .travis.yml file. 
See https://docs.travis-ci.com/user/notifications

___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] Fosdem dinner

2018-01-25 Thread Daniel-Constantin Mierla
Hello,

we have to do the reservation soon, therefore I am sending a reminder
for who plans to attend but hasn't announced it yet: do it asap,
otherwise there might not be enough seats to accommodate you.

Also, if you announced your participation, but something changed, like
how many persons are coming with you, notify us quickly.

Like at the past similar events at Fosdem, each participant pays for
herself/himself, we just arrange for a place where to go together and
enjoy the evening.

Cheers,
Daniel

On 15.01.18 09:28, Daniel-Constantin Mierla wrote:
> Hello,
>
> in the past 10 years or so, many of us met at Fosdem conference in
> Brussels (the edition this year happens during February 3-4) and had a
> dinner on Saturday evening. I know already couple of people from
> community that will go there, so the question is if there is any
> interest to organize again such event.
>
> If yes, it will be again on Saturday, on the evening of the 3rd of February.
>
> At the past editions, it turned into an all-RTC dinner, but we can
> consider to have it alone again (eventually with few other invited
> friends), if there are too many or people want a smaller meeting.
>
> Reply this week if you want to join, so we can estimate how many seats
> we need and have enough time to find a place that can accommodate us.
>
> More about Fosdem can be found at:
>
>   - https://fosdem.org
>
> There is a devroom on Sunday with topics covering real time
> communications. I will have a presentation there.
>
> Cheers,
> Daniel
>

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - March 5-7, 2018, Berlin - www.asipto.com
Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] Errored: kamailio/kamailio#5426 (master - 0aa43ef)

2018-01-25 Thread Travis CI
Build Update for kamailio/kamailio
-

Build: #5426
Status: Errored

Duration: 10 minutes and 47 seconds
Commit: 0aa43ef (master)
Author: Daniel-Constantin Mierla
Message: Makefile.defs: version set to 5.2.0-dev3

View the changeset: 
https://github.com/kamailio/kamailio/compare/44dc6caa2b0f...0aa43efe604c

View the full build log and details: 
https://travis-ci.org/kamailio/kamailio/builds/333181714?utm_source=email&utm_medium=notification

--

You can configure recipients for build notifications in your .travis.yml file. 
See https://docs.travis-ci.com/user/notifications

___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:3ebf0704: pkg/kamailio/deb: version set to 5.2.0~dev3

2018-01-25 Thread Victor Seva
Module: kamailio
Branch: master
Commit: 3ebf070467aecd4a7e3d5e287b776831f31b25d8
URL: 
https://github.com/kamailio/kamailio/commit/3ebf070467aecd4a7e3d5e287b776831f31b25d8

Author: Victor Seva 
Committer: Victor Seva 
Date: 2018-01-25T10:35:09+01:00

pkg/kamailio/deb: version set to 5.2.0~dev3

---

Modified: pkg/kamailio/deb/buster/changelog
Modified: pkg/kamailio/deb/debian/changelog
Modified: pkg/kamailio/deb/jessie/changelog
Modified: pkg/kamailio/deb/precise/changelog
Modified: pkg/kamailio/deb/sid/changelog
Modified: pkg/kamailio/deb/stretch/changelog
Modified: pkg/kamailio/deb/trusty/changelog
Modified: pkg/kamailio/deb/wheezy/changelog
Modified: pkg/kamailio/deb/xenial/changelog

---

Diff:  
https://github.com/kamailio/kamailio/commit/3ebf070467aecd4a7e3d5e287b776831f31b25d8.diff
Patch: 
https://github.com/kamailio/kamailio/commit/3ebf070467aecd4a7e3d5e287b776831f31b25d8.patch


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:0aa43efe: Makefile.defs: version set to 5.2.0-dev3

2018-01-25 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 0aa43efe604c99da9a1e579ed19407fae4d8f2f9
URL: 
https://github.com/kamailio/kamailio/commit/0aa43efe604c99da9a1e579ed19407fae4d8f2f9

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2018-01-25T10:24:35+01:00

Makefile.defs: version set to 5.2.0-dev3

---

Modified: src/Makefile.defs

---

Diff:  
https://github.com/kamailio/kamailio/commit/0aa43efe604c99da9a1e579ed19407fae4d8f2f9.diff
Patch: 
https://github.com/kamailio/kamailio/commit/0aa43efe604c99da9a1e579ed19407fae4d8f2f9.patch

---

diff --git a/src/Makefile.defs b/src/Makefile.defs
index 48ec3c919d..2355d8b3df 100644
--- a/src/Makefile.defs
+++ b/src/Makefile.defs
@@ -107,7 +107,7 @@ INSTALL_FLAVOUR=$(FLAVOUR)
 VERSION = 5
 PATCHLEVEL = 2
 SUBLEVEL =  0
-EXTRAVERSION = -dev2
+EXTRAVERSION = -dev3
 
 # memory manager switcher
 # 0 - f_malloc (fast malloc)


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:2fc3be57: siptrace: use formatted string instead of series of concatenations

2018-01-25 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 2fc3be572afe4dc666f7345c733a5bc1c8e94932
URL: 
https://github.com/kamailio/kamailio/commit/2fc3be572afe4dc666f7345c733a5bc1c8e94932

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2018-01-25T10:18:20+01:00

siptrace: use formatted string instead of series of concatenations

---

Modified: src/modules/siptrace/siptrace.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/2fc3be572afe4dc666f7345c733a5bc1c8e94932.diff
Patch: 
https://github.com/kamailio/kamailio/commit/2fc3be572afe4dc666f7345c733a5bc1c8e94932.patch

---

diff --git a/src/modules/siptrace/siptrace.c b/src/modules/siptrace/siptrace.c
index 851bf6e0f8..d936e4fbb6 100644
--- a/src/modules/siptrace/siptrace.c
+++ b/src/modules/siptrace/siptrace.c
@@ -1179,22 +1179,30 @@ static void trace_onreply_in(struct cell *t, int type, 
struct tmcb_params *ps)
strcpy(statusbuf, int2str(ps->code, &sto.status.len));
sto.status.s = statusbuf;
 
-   siptrace_copy_proto(msg->rcv.proto, sto.fromip_buff);
-   strcat(sto.fromip_buff, ip_addr2a(&msg->rcv.src_ip));
-   strcat(sto.fromip_buff, ":");
-   strcat(sto.fromip_buff, int2str(msg->rcv.src_port, NULL));
-   sto.fromip.s = sto.fromip_buff;
-   sto.fromip.len = strlen(sto.fromip_buff);
+   sto.fromip.len = snprintf(sto.fromip_buff, SIPTRACE_ADDR_MAX, 
"%s:%s:%d",
+   siptrace_proto_name(msg->rcv.proto),
+   ip_addr2a(&msg->rcv.src_ip), (int)msg->rcv.src_port);
+   if(sto.fromip.len<0 || sto.fromip.len>=SIPTRACE_ADDR_MAX) {
+   LM_ERR("failed to format fromip buffer (%d)\n", sto.fromip.len);
+   sto.fromip.s = SIPTRACE_ANYADDR;
+   sto.fromip.len = SIPTRACE_ANYADDR_LEN;
+   } else {
+   sto.fromip.s = sto.fromip_buff;
+   }
 
if(trace_local_ip.s && trace_local_ip.len > 0) {
sto.toip = trace_local_ip;
} else {
-   siptrace_copy_proto(msg->rcv.proto, sto.toip_buff);
-   strcat(sto.toip_buff, ip_addr2a(&msg->rcv.dst_ip));
-   strcat(sto.toip_buff, ":");
-   strcat(sto.toip_buff, int2str(msg->rcv.dst_port, NULL));
-   sto.toip.s = sto.toip_buff;
-   sto.toip.len = strlen(sto.toip_buff);
+   sto.toip.len = snprintf(sto.toip_buff, SIPTRACE_ADDR_MAX, 
"%s:%s:%d",
+   siptrace_proto_name(msg->rcv.proto),
+   ip_addr2a(&msg->rcv.dst_ip), 
(int)msg->rcv.dst_port);
+   if(sto.toip.len<0 || sto.toip.len>=SIPTRACE_ADDR_MAX) {
+   LM_ERR("failed to format toip buffer (%d)\n", 
sto.toip.len);
+   sto.toip.s = SIPTRACE_ANYADDR;
+   sto.toip.len = SIPTRACE_ANYADDR_LEN;
+   } else {
+   sto.toip.s = sto.toip_buff;
+   }
}
 
sto.dir = "in";
@@ -1280,12 +1288,16 @@ static void trace_onreply_out(struct cell *t, int type, 
struct tmcb_params *ps)
if(trace_local_ip.s && trace_local_ip.len > 0) {
sto.fromip = trace_local_ip;
} else {
-   siptrace_copy_proto(msg->rcv.proto, sto.fromip_buff);
-   strcat(sto.fromip_buff, ip_addr2a(&req->rcv.dst_ip));
-   strcat(sto.fromip_buff, ":");
-   strcat(sto.fromip_buff, int2str(req->rcv.dst_port, NULL));
-   sto.fromip.s = sto.fromip_buff;
-   sto.fromip.len = strlen(sto.fromip_buff);
+   sto.fromip.len = snprintf(sto.fromip_buff, SIPTRACE_ADDR_MAX, 
"%s:%s:%d",
+   siptrace_proto_name(msg->rcv.proto),
+   ip_addr2a(&req->rcv.dst_ip), 
(int)req->rcv.dst_port);
+   if(sto.fromip.len<0 || sto.fromip.len>=SIPTRACE_ADDR_MAX) {
+   LM_ERR("failed to format fromip buffer (%d)\n", 
sto.fromip.len);
+   sto.fromip.s = SIPTRACE_ANYADDR;
+   sto.fromip.len = SIPTRACE_ANYADDR_LEN;
+   } else {
+   sto.fromip.s = sto.fromip_buff;
+   }
}
 
strcpy(statusbuf, int2str(ps->code, &sto.status.len));
@@ -1298,13 +1310,16 @@ static void trace_onreply_out(struct cell *t, int type, 
struct tmcb_params *ps)
sto.toip.len = SIPTRACE_ANYADDR_LEN;
} else {
su2ip_addr(&to_ip, &dst->to);
-   siptrace_copy_proto(dst->proto, sto.toip_buff);
-   strcat(sto.toip_buff, ip_addr2a(&to_ip));
-   strcat(sto.toip_buff, ":");
-   strcat(sto.toip_buff,
-   int2str((unsigned long)su_getport(&dst->to), 
&len));
-   sto.toip.s = sto.toip_buff;
-   sto.toip.len = strlen(sto.toip_buff);
+   sto.toip.len = snprintf(sto.toip_buff, SIPTRACE_ADDR_MAX, 
"%s:%s:%d",
+