[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sr-dev
Subject:    Re: [sr-dev] [kamailio] tcpops: implement event_route for unexpectedly closed tcp connections (#454)
From:       Armen Babikyan <notifications () github ! com>
Date:       2015-12-31 5:42:55
Message-ID: kamailio/kamailio/pull/454/c168128187 () github ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi Daniel,

I just repushed this branch. Originally, I only considered tcp connection kill via \
TCP RST (which results in read() == -1 && errno == ECONNRESET) and timeout events \
(read() == -1 && errno == ETIMEDOUT).  I have revised my branch to also execute the \
event_route on gracefully-closed TCP connections (i.e. via TCP FIN), which is \
delivered to the program as read() == 0 (i.e. EOF).

Additionally, I have restricted the execution of this event_route that have a $conid \
variable that does not evaluate to "<null>" in the script.  This is determined via \
connections that have TCP_REQ_COMPLETE(req) set to true (which is when con->id is \
copied to con->proto_reserved1).  Do let me know if this is not the correct strategy \
here.

Thanks!

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/454#issuecomment-168128187


[Attachment #5 (text/html)]

<p>Hi Daniel,</p>

<p>I just repushed this branch. Originally, I only considered tcp connection kill via \
TCP RST (which results in read() == -1 &amp;&amp; errno == ECONNRESET) and timeout \
events (read() == -1 &amp;&amp; errno == ETIMEDOUT).  I have revised my branch to \
also execute the event_route on gracefully-closed TCP connections (i.e. via TCP FIN), \
which is delivered to the program as read() == 0 (i.e. EOF).</p>

<p>Additionally, I have restricted the execution of this event_route that have a \
$conid variable that does not evaluate to "" in the script.  This is determined via \
connections that have TCP_REQ_COMPLETE(req) set to true (which is when con-&gt;id is \
copied to con-&gt;proto_reserved1).  Do let me know if this is not the correct \
strategy here.</p>

<p>Thanks!</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply \
to this email directly or <a \
href="https://github.com/kamailio/kamailio/pull/454#issuecomment-168128187">view it \
on GitHub</a>.<img alt="" height="1" \
src="https://github.com/notifications/beacon/AF36ZSJOEvG5XtT0QSglbQ7fYpIZ3I3Zks5pVLffgaJpZM4G64Qp.gif" \
width="1" /></p> <div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" \
href="https://github.com/kamailio/kamailio/pull/454#issuecomment-168128187"></link>  \
<meta itemprop="name" content="View Pull Request"></meta> </div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>



_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic