- Use tcp connects to talk with other DAs [bnc#1117969]

new patch: openslp.tcpknownda.diff
- Fix segfault in predicate match if a registered service has
  a malformed attribute list [bnc#1136136]
  new patch: openslp.nullattr.diff

OBS-URL: https://build.opensuse.org/package/show/network:utilities/openslp?expand=0&rev=66
This commit is contained in:
Michael Schröder 2019-06-07 14:03:54 +00:00 committed by Git OBS Bridge
parent ec7846d6e9
commit 38796dc333
4 changed files with 120 additions and 0 deletions

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Fri Jun 7 16:00:46 CEST 2019 - mls@suse.de
- Use tcp connects to talk with other DAs [bnc#1117969]
new patch: openslp.tcpknownda.diff
- Fix segfault in predicate match if a registered service has
a malformed attribute list [bnc#1136136]
new patch: openslp.nullattr.diff
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Jun 6 16:17:45 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com> Thu Jun 6 16:17:45 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>

13
openslp.nullattr.diff Normal file
View File

@ -0,0 +1,13 @@
--- slpd/slpd_predicate.c.orig 2019-06-06 14:12:09.025492155 +0000
+++ slpd/slpd_predicate.c 2019-06-06 14:12:56.605386533 +0000
@@ -2111,6 +2111,10 @@ int SLPDPredicateTestTree(SLPDPredicateT
if (!parseTree)
return 1;
+ /* a NULL set of attribures is always false */
+ if (!slp_attr)
+ return 0;
+
err = treeFilter(parseTree, slp_attr);
return (err == FR_EVAL_TRUE);

View File

@ -54,6 +54,8 @@ Patch18: openslp.openssl-1.1.diff
Patch19: openslp.localaddr.diff Patch19: openslp.localaddr.diff
Patch20: openslp.tcpunicast.diff Patch20: openslp.tcpunicast.diff
Patch21: openslp-2.0.0-ifdef-slpv2.diff Patch21: openslp-2.0.0-ifdef-slpv2.diff
Patch22: openslp.tcpknownda.diff
Patch23: openslp.nullattr.diff
BuildRequires: bison BuildRequires: bison
BuildRequires: flex BuildRequires: flex
BuildRequires: libtool BuildRequires: libtool
@ -140,6 +142,8 @@ such applications.
%patch19 %patch19
%patch20 %patch20
%patch21 -p1 %patch21 -p1
%patch22
%patch23
%build %build
autoreconf -fiv autoreconf -fiv

94
openslp.tcpknownda.diff Normal file
View File

@ -0,0 +1,94 @@
--- slpd/slpd_knownda.c.orig 2018-12-06 14:03:06.033908426 +0000
+++ slpd/slpd_knownda.c 2018-12-06 14:12:30.448421700 +0000
@@ -261,7 +261,7 @@ void SLPDKnownDARegisterAll(SLPMessage *
/*----------------------------------------------*/
/* Establish a new connection with the known DA */
/*----------------------------------------------*/
- sock = SLPDOutgoingConnect(0, &(daadvert->peer));
+ sock = SLPDOutgoingConnect(1, &(daadvert->peer));
if (sock)
while (1)
{
@@ -294,7 +294,8 @@ void SLPDKnownDARegisterAll(SLPMessage *
/* link newly constructed buffer to socket resendlist, and send */
/*--------------------------------------------------------------*/
SLPListLinkTail(&(sock->sendlist), (SLPListItem *) sendbuf);
- SLPDOutgoingDatagramWrite(sock, sendbuf);
+ if (sock->state == STREAM_CONNECT_IDLE)
+ sock->state = STREAM_WRITE_FIRST;
}
}
}
@@ -433,7 +434,7 @@ void SLPDKnownDADeregisterAll(SLPMessage
return;
/* Establish a new connection with the known DA */
- sock = SLPDOutgoingConnect(0, &(daadvert->peer));
+ sock = SLPDOutgoingConnect(1, &(daadvert->peer));
if (sock)
while (1)
{
@@ -459,7 +460,8 @@ void SLPDKnownDADeregisterAll(SLPMessage
/* link newly constructed buffer to socket resendlist, and send */
/*--------------------------------------------------------------*/
SLPListLinkTail(&(sock->sendlist), (SLPListItem *) sendbuf);
- SLPDOutgoingDatagramWrite(sock, sendbuf);
+ if (sock->state == STREAM_CONNECT_IDLE)
+ sock->state = STREAM_WRITE_FIRST;
}
}
}
@@ -502,14 +504,15 @@ int SLPDKnownDAFromDHCP()
Get an outgoing socket to the DA and set it up to make
the service:directoryagent request
--------------------------------------------------------*/
- sock = SLPDOutgoingConnect(0, &daaddr);
+ sock = SLPDOutgoingConnect(1, &daaddr);
if (sock)
{
buf = 0;
if (MakeActiveDiscoveryRqst(0, &buf) == 0)
{
SLPListLinkTail(&(sock->sendlist), (SLPListItem *) buf);
- SLPDOutgoingDatagramWrite(sock, buf);
+ if (sock->state == STREAM_CONNECT_IDLE)
+ sock->state = STREAM_WRITE_FIRST;
}
}
}
@@ -601,14 +604,15 @@ int SLPKnownDAFromProperties()
/* Get an outgoing socket to the DA and set it up to make */
/* the service:directoryagent request */
/*--------------------------------------------------------*/
- sock = SLPDOutgoingConnect(0, &daaddr);
+ sock = SLPDOutgoingConnect(1, &daaddr);
if (sock)
{
buf = 0;
if (MakeActiveDiscoveryRqst(0, &buf) == 0)
{
SLPListLinkTail(&(sock->sendlist), (SLPListItem *) buf);
- SLPDOutgoingDatagramWrite(sock, buf);
+ if (sock->state == STREAM_CONNECT_IDLE)
+ sock->state = STREAM_WRITE_FIRST;
}
}
}
@@ -1470,14 +1474,15 @@ void SLPDKnownDAEcho(SLPMessage * msg, S
/*------------------------------------------*/
/* Load the socket with the message to send */
/*------------------------------------------*/
- sock = SLPDOutgoingConnect(0, &(entry->msg->peer));
+ sock = SLPDOutgoingConnect(1, &(entry->msg->peer));
if (sock)
{
dup = SLPBufferDup(buf);
if (dup)
{
SLPListLinkTail(&(sock->sendlist), (SLPListItem *) dup);
- SLPDOutgoingDatagramWrite(sock, buf);
+ if (sock->state == STREAM_CONNECT_IDLE)
+ sock->state = STREAM_WRITE_FIRST;
}
else
sock->state = SOCKET_CLOSE;