Module: kamailio
Branch: master
Commit: 3ef396813e7ff8a0b426a7a188bb01d7f34d814c
URL: https://github.com/kamailio/kamailio/commit/3ef396813e7ff8a0b426a7a188bb01d…
Author: Federico Favaro <federico.favaro(a)athonet.com>
Committer: Federico Favaro <federico.favaro(a)athonet.com>
Date: 2016-09-29T10:15:12+02:00
ims_auth: Put fresh keys from HSS on top of list
If S-CSCF downloaded fresh keys from the HSS, put it
on the top of the list, as they are already been sent
to the UE via 401 message so it should be the first
to be retrived to comparison once REGISTER with challenge
comes from the UE
---
Modified: modules/ims_auth/authorize.c
---
Diff: https://github.com/kamailio/kamailio/commit/3ef396813e7ff8a0b426a7a188bb01d…
Patch: https://github.com/kamailio/kamailio/commit/3ef396813e7ff8a0b426a7a188bb01d…
---
diff --git a/modules/ims_auth/authorize.c b/modules/ims_auth/authorize.c
index 4facbb9..09c7137 100644
--- a/modules/ims_auth/authorize.c
+++ b/modules/ims_auth/authorize.c
@@ -1689,12 +1689,13 @@ int add_auth_vector(str private_identity, str public_identity, auth_vector * av)
private_identity.len, private_identity.s, aud->hash);
- av->prev = aud->tail;
- av->next = 0;
+ av->prev = 0;
+ if (aud->head) {
+ av->next = aud->head;
+ aud->head->prev = av;
+ }
- if (!aud->head) aud->head = av;
- if (aud->tail) aud->tail->next = av;
- aud->tail = av;
+ aud->head = av;
auth_data_unlock(aud->hash);
return 1;
```
Reading symbols from kamailio...Reading symbols from /usr/lib/debug/.build-id/10/824757bd1066806f2e19310929e17a9009a991.debug...done.
done.
[New LWP 5583]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/sbin/kamailio -f /etc/kamailio/proxy/kamailio.cfg -P /var/run/kamailio/kam'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 xavp_get_internal (name=0x7f486b2f7568, list=<optimized out>, idx=0, prv=0x0) at xavp.c:265
265 xavp.c: No such file or directory.
(gdb) bt
#0 xavp_get_internal (name=0x7f486b2f7568, list=<optimized out>, idx=0, prv=0x0) at xavp.c:265
#1 0x00007f486306b8b3 in pv_get_xavp (msg=0x7f4866d8e5f0, param=0x7f486b2f7768, res=0x7ffceb21ed90)
at pv_xavp.c:134
#2 0x000000000058f96e in pv_get_spec_value (msg=0x7f4866d8e5f0, sp=0x7f486b2f7750,
value=0x7ffceb21ed90) at pvapi.c:1307
#3 0x00007f479badb45d in lua_sr_pv_get (L=0x2b46aa0) at app_lua_sr.c:906
...
(gdb) f 3
#3 0x00007f479badb45d in lua_sr_pv_get (L=0x2b46aa0) at app_lua_sr.c:906
906 app_lua_sr.c: No such file or directory.
(gdb) p pvn
$5 = {s = 0x2c47588 "$xavp(caller_dom_prefs=>dummy)", len = 30}
(gdb) f 2
#2 0x000000000058f96e in pv_get_spec_value (msg=0x7f4866d8e5f0, sp=0x7f486b2f7750,
value=0x7ffceb21ed90) at pvapi.c:1307
1307 pvapi.c: No such file or directory.
(gdb) p sp
$6 = (pv_spec_p) 0x7f486b2f7750
(gdb) p *sp
$7 = {type = PVT_XAVP, getf = 0x7f486306b810 <pv_get_xavp>, setf = 0x7f486306c640 <pv_set_xavp>,
pvp = {pvn = {type = 1, nfree = 0x0, u = {isname = {type = 1798272592, name = {n = 0, s = {
s = 0x0, len = 0}, re = 0x0}}, dname = 0x7f486b2f7650}}, pvi = {type = 0, u = {
ival = 0, dval = 0x0}}}, trans = 0x0}
(gdb) f 1
#1 0x00007f486306b8b3 in pv_get_xavp (msg=0x7f4866d8e5f0, param=0x7f486b2f7768, res=0x7ffceb21ed90)
at pv_xavp.c:134
134 pv_xavp.c: No such file or directory.
(gdb) p xname
$8 = (pv_xavp_name_t *) 0x7f486b2f7650
(gdb) p *xname
$9 = {name = {s = 0x7f486b2f77b6 "caller_dom_prefs=>dummy)", len = 16}, index = {type = PVT_NONE,
getf = 0x0, setf = 0x0, pvp = {pvn = {type = 0, nfree = 0x0, u = {isname = {type = 0, name = {
n = 0, s = {s = 0x0, len = 0}, re = 0x0}}, dname = 0x0}}, pvi = {type = 0, u = {
ival = 0, dval = 0x0}}}, trans = 0x0}, next = 0x7f486b2f7568}
(gdb) p *xname->next
$10 = {name = {s = 0x7f486b2f77c8 "dummy)", len = 5}, index = {type = PVT_NONE, getf = 0x0,
setf = 0x0, pvp = {pvn = {type = 0, nfree = 0x0, u = {isname = {type = 0, name = {n = 0, s = {
s = 0x0, len = 0}, re = 0x0}}, dname = 0x0}}, pvi = {type = 0, u = {ival = 0,
dval = 0x0}}}, trans = 0x0}, next = 0x0}
(gdb) p avp
$11 = <optimized out>
(gdb) p avp->val
value has been optimized out
(gdb) p avp->val.v
value has been optimized out
(gdb) p avp->val.v.xavp
value has been optimized out
```
Relevant code?
```
static sr_xavp_t *xavp_get_internal(str *name, sr_xavp_t **list, int idx, sr_xavp_t **prv)
{
sr_xavp_t *avp;
unsigned int id;
int n = 0;
if(name==NULL || name->s==NULL)
return NULL;
id = get_hash1_raw(name->s, name->len);
if(list && *list)
avp = *list;
else
avp = *_xavp_list_crt;
while(avp)
{
if(avp->id==id && avp->name.len==name->len
&& strncmp(avp->name.s, name->s, name->len)==0)
{
if(idx==n)
return avp;
n++;
}
if(prv)
*prv = avp;
avp = avp->next;
}
return NULL;
}
```
--
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/issues/808
Hi!
The maxfwd module has a lot of old function names hanging around.
Is there a way to mark them deprecated?
I would like to mark them in a way so they do not show up in the alphabetic indexes.
In addition, I would like to add a note in the docs about not using them - maybe moving them to a section called “Old function names (deprecated)”
in the README.
The README is a bit confusing today and I would like to clean it up.
I am not suggesting to remove them and break backwards compatibility, just moving them out of sight.
/O
If a PUBLISH request is sent before a 200 OK for the previous PUBLISH request is received, the E-Tag is reset which leads to inconsistent presentity data in the presence server.
This is happening because the second PUBLISH is sent with the same E-Tag as the previous one, but the presence server has an updated the E-Tag (generated while handling the first PUBLISH).
The pua module should implement a queuing mechanism for subsequent PUBLISH request while a previous PUBLISH transaction is in progress. No new PUBLISH requests should be sent before a response to the previous PUBLISH request was received and the E-Tag updated.
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/21