<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
On 3/29/12 10:35 PM, Krishna Kurapati wrote:
<blockquote
cite="mid:CAOzCjAfQoBfXt1-QBjX5c_-kwL6SFrHZHAK_qE4+sqL5BHvFjw@mail.gmail.com"
type="cite">Daniel,
<div><br>
</div>
<div>I finally had some time to put a log after it failed to
convert from to socket.</div>
<div><br>
</div>
<div>
<div>
<div>ERROR: siptrace [siptrace.c:1704]: there is not a valid
number port 5060??k5</div>
</div>
</div>
</blockquote>
<br>
as you can see the port is printed as '5060??k5', which is invalid.
Somewhere is missing a null termination or the length is wrong.<br>
<br>
Maybe Alexandr can have a look, being the author of that piece of
code.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<blockquote
cite="mid:CAOzCjAfQoBfXt1-QBjX5c_-kwL6SFrHZHAK_qE4+sqL5BHvFjw@mail.gmail.com"
type="cite">
<div>
<div>
<div>Mar 29 13:30:32 siptest /usr/sbin/kamailio[19848]: ERROR:
siptrace [siptrace.c:1514]: ERROR: bad FROM tcp:<a
moz-do-not-send="true" href="http://10.1.0.6:5060">10.1.0.6:5060</a>
or TO tcp:<a moz-do-not-send="true"
href="http://75.62.17.45:63343">75.62.17.45:63343</a></div>
</div>
<div><br>
</div>
<div>The passing parameter to the function look fine. Well
formed and null terminated. Inside it is failing.</div>
<div>Any ideas....</div>
<div><br>
</div>
<div>Attaching the code segments around the lines</div>
<div><br>
</div>
<div><br>
</div>
<div>Code around line 1514:</div>
<div><br>
</div>
<div>
<div> /* Convert proto:ip:port to sockaddress union SRC
IP */</div>
<div> if (pipport2su(from->s, &from_su,
&proto)==-1 || (pipport2su(to->s, &to_su,
&proto)==-1))</div>
<div> {</div>
<div> LOG(L_ERR, "ERROR: bad FROM %s or TO
%s\n", from->s, to->s);</div>
<div> goto error;</div>
<div> }</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>
Code around line 1704:</div>
<div><br>
</div>
<div>
<div> else {</div>
<div> /*the address contains a port number*/</div>
<div> *p = '\0';</div>
<div> p++;</div>
<div> port_str.s = p;</div>
<div> port_str.len = strlen(p);</div>
<div> LM_DBG("the port string is %s\n", p);</div>
<div> if(str2int(&port_str, &port_no)
!= 0 ) {</div>
<div> LM_ERR("there is not a valid
number port %s\n", p);</div>
<div> goto error;</div>
<div> }</div>
<div> *p = '\0';</div>
<div> }</div>
<div><br>
</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<br>
<div class="gmail_quote">On Wed, Mar 28, 2012 at 2:16 PM,
Daniel-Constantin Mierla <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:miconda@gmail.com">miconda@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> have you changed the
log line to print the port? can you print the entire
string, with proto and ip to see if there are
spaces/invalid characters (print it between special chars,
like [])?<br>
<br>
The line is inside the mirroring traffic via hep protocol,
is what you want to get, right?<br>
<br>
Cheers,<br>
Daniel
<div>
<div class="h5"><br>
<br>
On 3/28/12 12:53 PM, Krishna Kurapati wrote:
<blockquote type="cite">I tried to pull null
terminator to see if that fixes the issue. That is
why there is shift in the lines. It is same as line
1701.
<div><br>
</div>
<div>Krish Kura<br>
<br>
<div class="gmail_quote">On Wed, Mar 28, 2012 at
3:57 AM, Daniel-Constantin Mierla <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:miconda@gmail.com"
target="_blank">miconda@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0
0 0 .8ex;border-left:1px #ccc
solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> Hello,<br>
<br>
are you working with a custom siptrace
module? the line in siptrace.c does not
match. If you changed the sources, paste
here the lines in siptrace.c around 1705, 10
before and 10 after.<br>
<br>
Cheers,<br>
Daniel
<div>
<div><br>
<br>
On 3/26/12 3:23 PM, Krishna Kurapati
wrote: </div>
</div>
<blockquote type="cite">
<div>
<div>Hi,
<div><br>
</div>
<div>I keep getting this error in the
sip_trace module:</div>
<div><br>
</div>
<div>Mar 26 06:19:26 siptest
/usr/sbin/kamailio[4279]: ERROR:
siptrace [siptrace.c:1705]: there is
not a valid number port 5060?/??</div>
<div><br>
</div>
<div>Krish Kura</div>
<br>
<fieldset></fieldset>
<br>
</div>
</div>
<pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><span><font color="#888888">
</font></span></pre>
<span><font color="#888888"> </font></span></blockquote>
<span><font color="#888888"> <br>
<pre cols="72">--
Daniel-Constantin Mierla
Kamailio Advanced Training, April 23-26, 2012, Berlin, Germany
<a moz-do-not-send="true" href="http://www.asipto.com/index.php/kamailio-advanced-training/" target="_blank">http://www.asipto.com/index.php/kamailio-advanced-training/</a></pre>
</font></span></div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
<pre cols="72">--
Daniel-Constantin Mierla
Kamailio Advanced Training, April 23-26, 2012, Berlin, Germany
<a moz-do-not-send="true" href="http://www.asipto.com/index.php/kamailio-advanced-training/" target="_blank">http://www.asipto.com/index.php/kamailio-advanced-training/</a></pre>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
Kamailio Advanced Training, April 23-26, 2012, Berlin, Germany
<a class="moz-txt-link-freetext" href="http://www.asipto.com/index.php/kamailio-advanced-training/">http://www.asipto.com/index.php/kamailio-advanced-training/</a></pre>
</body>
</html>