<p>Hoernchen has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/libosmo-abis/+/14565">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">add TCP_USER_TIMEOUT to keepalive<br><br>The patch sets TCP_USER_TIMEOUT to the same timeout value,<br>since keepalive only applies to idle connections, but we obviously want<br>to fail as fast as possible even if there is data to send and it's not<br>acked.<br><br>Change-Id: I5e7425958472aa5d758e09bfbefc7d7d37bf6f5f<br>---<br>M src/input/ipaccess.c<br>1 file changed, 11 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/65/14565/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c</span><br><span>index d0fa023..fb6ad10 100644</span><br><span>--- a/src/input/ipaccess.c</span><br><span>+++ b/src/input/ipaccess.c</span><br><span>@@ -459,6 +459,17 @@</span><br><span>                         LOGP(DLINP, LOGL_NOTICE,</span><br><span>                          "Failed to set keepalive count: %s\n",</span><br><span>                             strerror(errno));</span><br><span style="color: hsl(120, 100%, 40%);">+#if defined(TCP_USER_TIMEOUT)</span><br><span style="color: hsl(120, 100%, 40%);">+                val = 1000 * line->keepalive_num_probes *</span><br><span style="color: hsl(120, 100%, 40%);">+                        line->keepalive_probe_interval +</span><br><span style="color: hsl(120, 100%, 40%);">+                        line->keepalive_idle_timeout;</span><br><span style="color: hsl(120, 100%, 40%);">+                ret = setsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT,</span><br><span style="color: hsl(120, 100%, 40%);">+                                 &val, sizeof(val));</span><br><span style="color: hsl(120, 100%, 40%);">+                if (ret < 0)</span><br><span style="color: hsl(120, 100%, 40%);">+                        LOGP(DLINP, LOGL_NOTICE,</span><br><span style="color: hsl(120, 100%, 40%);">+                             "Failed to set user timoeut: %s\n",</span><br><span style="color: hsl(120, 100%, 40%);">+                             strerror(errno));</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span> #endif</span><br><span>   }</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmo-abis/+/14565">change 14565</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/libosmo-abis/+/14565"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmo-abis </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I5e7425958472aa5d758e09bfbefc7d7d37bf6f5f </div>
<div style="display:none"> Gerrit-Change-Number: 14565 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Hoernchen <ewild@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>