Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.2:Test
openslp
openslp.discovery.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File openslp.discovery.diff of Package openslp
--- slpd/slpd_outgoing.c.orig 2009-12-22 15:23:09.000000000 +0000 +++ slpd/slpd_outgoing.c 2009-12-22 15:47:35.000000000 +0000 @@ -420,6 +420,24 @@ SLPDSocket* SLPDOutgoingConnect(struct i } /*=========================================================================*/ +int SLPDHaveOutgoingConnectedSocket(struct in_addr* addr) +/* Check if there is an outgoing socket for the specified address */ +/* */ +/* addr (IN) the address of the peer to check */ +/*=========================================================================*/ +{ + SLPDSocket* sock = (SLPDSocket*)G_OutgoingSocketList.head; + while ( sock ) + { + if (sock->state >= STREAM_CONNECT_IDLE && + sock->peeraddr.sin_addr.s_addr == addr->s_addr) + return 1; + sock = (SLPDSocket*)sock->listitem.next; + } + return 0; +} + +/*=========================================================================*/ void SLPDOutgoingDatagramWrite(SLPDSocket* sock) /* Add a ready to write outgoing datagram socket to the outgoing list. */ /* The datagram will be written then sit in the list until it ages out */ --- slpd/slpd_outgoing.h.orig 2009-12-22 15:43:52.000000000 +0000 +++ slpd/slpd_outgoing.h 2009-12-22 15:45:26.000000000 +0000 @@ -107,6 +107,13 @@ SLPDSocket* SLPDOutgoingConnect(struct i /* returns: pointer to socket or null on error */ /*=========================================================================*/ +/*=========================================================================*/ +int SLPDHaveOutgoingConnectedSocket(struct in_addr* addr); +/* Check if there is an outgoing socket for the specified address */ +/* */ +/* addr (IN) the address of the peer to check */ +/*=========================================================================*/ + /*=========================================================================*/ int SLPDOutgoingInit(); --- slpd/slpd_process.c.orig 2009-12-22 15:01:43.000000000 +0000 +++ slpd/slpd_process.c 2009-12-22 15:43:20.000000000 +0000 @@ -1120,7 +1120,11 @@ int ProcessDAAdvert(SLPMessage message, if(G_SlpdProperty.DAActiveDiscoveryInterval == 0 && message->header.xid != 0) { - goto RESPOND; + /* do not ignore replys of our DiscoveryRequests made for + * static and dhcp configured DAs. For now we check this by + * testing if the sockaddr is on the outgoing socket list */ + if (!SLPDHaveOutgoingConnectedSocket(&message->peer.sin_addr)) + goto RESPOND; } /*-------------------------------*/
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor