Hi,
From looking at the code, I'm not sure this is correct? In case of `received-from=`
given in the list of flags, I see `ng_flags->received_from` being referenced and
treated as a list (items added to it) before it's set to anything. I would expect to
see something like `ng_flags->received_from = bencode_list()` somewhere.
ng_flags-> recive_flags is set in the funtion
static int parse_flags(struct ng_flags_parse *ng_flags, struct sip_msg *msg, enum
rtpe_operation *op,
const char *flags_str)
in line number 2279 as
if (str_key_val_prefix(&key, "received-from",
&val, &s)) {
ip_af = get_ip_type(s.s);
if (ip_af == AF_INET)
{
s1.s="IP4";
s1.len=3;
bencode_list_add_str(ng_flags->received_from, &s1);
bencode_list_add_str(ng_flags->received_from, &s);
}else if (ip_af == AF_INET6)
{
s1.s="IP6";
s1.len=3;
bencode_list_add_str(ng_flags->received_from, &s1);
bencode_list_add_str(ng_flags->received_from, &s);
}
goto next;
}
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3230#issuecomment-1238914615
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3230/c1238914615(a)github.com>