<p></p>
<blockquote>
<p dir="auto">Hi,</p>
<p dir="auto">From looking at the code, I'm not sure this is correct? In case of <code class="notranslate">received-from=</code> given in the list of flags, I see <code class="notranslate">ng_flags->received_from</code> being referenced and treated as a list (items added to it) before it's set to anything. I would expect to see something like <code class="notranslate">ng_flags->received_from = bencode_list()</code> somewhere.</p>
</blockquote>
<p dir="auto">ng_flags-> recive_flags is set in the funtion<br>
static int parse_flags(struct ng_flags_parse *ng_flags, struct sip_msg *msg, enum rtpe_operation *op,<br>
const char *flags_str)</p>
<p dir="auto">in line number 2279 as</p>
<pre class="notranslate"><code class="notranslate">                  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;
        }
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/3230#issuecomment-1238914615">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZNFN6F2ZCAUPA6WPELV5APXFANCNFSM6AAAAAAQCU7W34">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/ABO7UZK6SEWLITI4WE24RATV5APXFA5CNFSM6AAAAAAQCU7W36WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSJ3BLDO.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><kamailio/kamailio/pull/3230/c1238914615</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/3230#issuecomment-1238914615",
"url": "https://github.com/kamailio/kamailio/pull/3230#issuecomment-1238914615",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>