<h4 dir="auto">Pre-Submission Checklist</h4>



<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Commit message has the format required by CONTRIBUTING guide</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Commits are split per component (core, individual modules, libs, utils, ...)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Each component has a single commit (if not, squash them into one commit)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> No commits to README files for modules (changes must be done to docbook files<br>
in <code class="notranslate">doc/</code> subfolder, the README file is autogenerated)</li>
</ul>
<h4 dir="auto">Type Of Change</h4>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Small bug fix (non-breaking change which fixes an issue)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> New feature (non-breaking change which adds new functionality)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Breaking change (fix or feature that would change existing functionality)</li>
</ul>
<h4 dir="auto">Checklist:</h4>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> PR should be backported to stable branches</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Tested changes locally</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Related to issue #XXXX (replace XXXX with an open issue number)</li>
</ul>
<h4 dir="auto">Description</h4>

<p dir="auto">We have seen that in deployments where there are strict port requirements on both side, there are tcp connections in TIME_WAIT state causing no fresh TCP connections possible until the TIME_WAIT is gone. In a lot of these case the clients are sending from them self a RST after they send a FIN,ACK from there side but some aren't doing this. The basic idea of this PR is to give an extra option for the tcp configuration from the cfg to trigger always an RST on connection close from Kamailio side. This currently done by enabling SO_LINGER with a value of 0 just before close.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/kamailio/kamailio/pull/3101'>https://github.com/kamailio/kamailio/pull/3101</a></p>

<h4>Commit Summary</h4>
<ul>
  <li><a href="https://github.com/kamailio/kamailio/pull/3101/commits/5dec1835ead540458e70dbea2eb648d775597398" class="commit-link">5dec183</a>  core: add an option to trigger also an RST on tcp connection close</li>
</ul>

<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/kamailio/kamailio/pull/3101/files">5 files</a>)</p>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/3101/files#diff-ea332ab631576daf6b8d1fed5c5a3bb0d444dab4bcfec1686878e0676c216b3e">src/core/cfg.lex</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/3101/files#diff-8c28c06cfd78356a6a3f66589893d0204b9835b80343df10dece05d44fc0d66b">src/core/cfg.y</a>
    (9)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/3101/files#diff-aee8567648ae9f54eaf1f7a0feb3302d981966a749b16710e2b457da7c22c412">src/core/tcp_main.c</a>
    (7)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/3101/files#diff-91338f0411df0e97a3d53c9c16248ea7bbd682d434fe900053a9f0407d5c2412">src/core/tcp_options.c</a>
    (3)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/3101/files#diff-d50f17bf6065a22589f1fc5de05fc5ef2caa9cf7d211de8fb8d96d48b6445250">src/core/tcp_options.h</a>
    (1)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/kamailio/kamailio/pull/3101.patch'>https://github.com/kamailio/kamailio/pull/3101.patch</a></li>
  <li><a href='https://github.com/kamailio/kamailio/pull/3101.diff'>https://github.com/kamailio/kamailio/pull/3101.diff</a></li>
</ul>

<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/3101">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZOBX3W4V3NDF6TUKYTVIFQ6ZANCNFSM5U7TFV3A">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/ABO7UZPLCIWKAY5AKBF5NKDVIFQ6ZA5CNFSM5U7TFV3KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4SH26FZQ.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/3101</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/3101",
"url": "https://github.com/kamailio/kamailio/pull/3101",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>