<p>tnt has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/libosmo-netif/+/18097">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">stream: Attempt to workaround kernel ABI breakage<br><br>See https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/include/uapi/linux/sctp.h?id=b6e6b5f1da7e8d092f86a4351802c27c0170c5a5<br>and https://marc.info/?l=linux-sctp&m=158729301516157&w=2<br><br>A kernel structure changed size, a new field was added at the end.<br>Attempt to submit with the known "old" size.<br><br>Signed-off-by: Sylvain Munaut <tnt@246tNt.com><br>Change-Id: Ia95dd1f9ffed9f743c049e05797b1a6f1f9f8c69<br>---<br>M src/stream.c<br>1 file changed, 5 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/97/18097/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/stream.c b/src/stream.c</span><br><span>index 65532d3..669657f 100644</span><br><span>--- a/src/stream.c</span><br><span>+++ b/src/stream.c</span><br><span>@@ -92,6 +92,11 @@</span><br><span>     rc = setsockopt(fd, IPPROTO_SCTP, SCTP_EVENTS,</span><br><span>                       &event, sizeof(event));</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+       /* Attempt to work around kernel ABI breakage */</span><br><span style="color: hsl(120, 100%, 40%);">+      if ((rc < 0) && (sizeof(event) != 13))</span><br><span style="color: hsl(120, 100%, 40%);">+             rc = setsockopt(fd, IPPROTO_SCTP, SCTP_EVENTS,</span><br><span style="color: hsl(120, 100%, 40%);">+                                &event, 13);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>   if (rc < 0)</span><br><span>               LOGP(DLINP, LOGL_ERROR, "couldn't activate SCTP events "</span><br><span>                    "on FD %u\n", fd);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmo-netif/+/18097">change 18097</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-netif/+/18097"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmo-netif </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ia95dd1f9ffed9f743c049e05797b1a6f1f9f8c69 </div>
<div style="display:none"> Gerrit-Change-Number: 18097 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: tnt <tnt@246tNt.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>