use AI_CANONNAME when looking up the canonical name

OBS-URL: https://build.opensuse.org/package/show/network:utilities/openslp?expand=0&rev=32
This commit is contained in:
Michael Schröder 2014-04-10 14:57:23 +00:00 committed by Git OBS Bridge
parent d81a655266
commit 510d6307e1
2 changed files with 30 additions and 24 deletions

View File

@ -1,5 +1,5 @@
--- ./common/slp_compare.c.orig 2012-12-12 19:12:43.000000000 +0000 --- ./common/slp_compare.c.orig 2012-12-12 19:12:43.000000000 +0000
+++ ./common/slp_compare.c 2014-02-19 16:51:59.737942446 +0000 +++ ./common/slp_compare.c 2014-04-10 14:54:49.730301497 +0000
@@ -414,6 +414,16 @@ int SLPCompareNamingAuth(size_t srvtypel @@ -414,6 +414,16 @@ int SLPCompareNamingAuth(size_t srvtypel
if (namingauthlen == 0xffff) if (namingauthlen == 0xffff)
return 0; /* match all naming authorities */ return 0; /* match all naming authorities */
@ -18,7 +18,7 @@
if (!namingauthlen) if (!namingauthlen)
return dot? 1: 0; /* IANA naming authority */ return dot? 1: 0; /* IANA naming authority */
--- ./common/slp_message.h.orig 2012-12-07 20:13:28.000000000 +0000 --- ./common/slp_message.h.orig 2012-12-07 20:13:28.000000000 +0000
+++ ./common/slp_message.h 2014-02-19 16:51:59.738942446 +0000 +++ ./common/slp_message.h 2014-04-10 14:54:49.730301497 +0000
@@ -127,6 +127,11 @@ @@ -127,6 +127,11 @@
#define SLP_REG_SOURCE_LOCAL 2 /* from localhost or IPC */ #define SLP_REG_SOURCE_LOCAL 2 /* from localhost or IPC */
#define SLP_REG_SOURCE_STATIC 3 /* from the slp.reg file */ #define SLP_REG_SOURCE_STATIC 3 /* from the slp.reg file */
@ -41,7 +41,7 @@
} SLPSrvReg; } SLPSrvReg;
--- ./common/slp_property.c.orig 2012-12-10 23:31:53.000000000 +0000 --- ./common/slp_property.c.orig 2012-12-10 23:31:53.000000000 +0000
+++ ./common/slp_property.c 2014-02-19 16:51:59.739942446 +0000 +++ ./common/slp_property.c 2014-04-10 14:54:49.730301497 +0000
@@ -80,12 +80,17 @@ static SLPList s_PropertyList = {0, 0, 0 @@ -80,12 +80,17 @@ static SLPList s_PropertyList = {0, 0, 0
/** The (optional) application-specified property file - module static. */ /** The (optional) application-specified property file - module static. */
@ -158,8 +158,8 @@
SLPMutexDestroy(s_PropDbLock); SLPMutexDestroy(s_PropDbLock);
s_PropertiesInitialized = false; s_PropertiesInitialized = false;
} }
--- ./common/slp_property.h.orig 2014-02-19 16:52:45.865942364 +0000 --- ./common/slp_property.h.orig 2012-11-28 17:07:04.000000000 +0000
+++ ./common/slp_property.h 2014-02-19 16:53:02.255942335 +0000 +++ ./common/slp_property.h 2014-04-10 14:54:49.730301497 +0000
@@ -66,6 +66,7 @@ int SLPPropertySetAppConfFile(const char @@ -66,6 +66,7 @@ int SLPPropertySetAppConfFile(const char
int SLPPropertyReinit(void); int SLPPropertyReinit(void);
int SLPPropertyInit(const char * gconffile); int SLPPropertyInit(const char * gconffile);
@ -169,7 +169,7 @@
/*! Special function to access MTU configuration property value. This provides /*! Special function to access MTU configuration property value. This provides
* fast access to the MTU value both in client libraries and server program. * fast access to the MTU value both in client libraries and server program.
--- ./common/slp_spi.c.orig 2012-11-28 17:07:04.000000000 +0000 --- ./common/slp_spi.c.orig 2012-11-28 17:07:04.000000000 +0000
+++ ./common/slp_spi.c 2014-02-19 16:51:59.739942446 +0000 +++ ./common/slp_spi.c 2014-04-10 14:54:49.730301497 +0000
@@ -426,6 +426,17 @@ int SLPSpiCanSign(SLPSpiHandle hspi, siz @@ -426,6 +426,17 @@ int SLPSpiCanSign(SLPSpiHandle hspi, siz
spistrlen, spistr) != 0; spistrlen, spistr) != 0;
} }
@ -189,7 +189,7 @@
/*=========================================================================*/ /*=========================================================================*/
--- ./common/slp_spi.h.orig 2012-11-28 17:07:04.000000000 +0000 --- ./common/slp_spi.h.orig 2012-11-28 17:07:04.000000000 +0000
+++ ./common/slp_spi.h 2014-02-19 16:51:59.740942446 +0000 +++ ./common/slp_spi.h 2014-04-10 14:54:49.730301497 +0000
@@ -106,6 +106,8 @@ int SLPSpiCanVerify(SLPSpiHandle hspi, s @@ -106,6 +106,8 @@ int SLPSpiCanVerify(SLPSpiHandle hspi, s
int SLPSpiCanSign(SLPSpiHandle hspi, size_t spistrlen, const char * spistr); int SLPSpiCanSign(SLPSpiHandle hspi, size_t spistrlen, const char * spistr);
@ -200,7 +200,7 @@
/*! @} */ /*! @} */
--- ./libslp/libslp_findsrvs.c.orig 2012-11-28 17:07:04.000000000 +0000 --- ./libslp/libslp_findsrvs.c.orig 2012-11-28 17:07:04.000000000 +0000
+++ ./libslp/libslp_findsrvs.c 2014-02-19 16:51:59.740942446 +0000 +++ ./libslp/libslp_findsrvs.c 2014-04-10 14:54:49.731301477 +0000
@@ -64,7 +64,7 @@ @@ -64,7 +64,7 @@
*/ */
static SLPBoolean CollateToSLPSrvURLCallback(SLPHandle hSLP, static SLPBoolean CollateToSLPSrvURLCallback(SLPHandle hSLP,
@ -306,7 +306,7 @@
} }
SLPMessageFree(replymsg); SLPMessageFree(replymsg);
--- ./libslp/slp.h.orig 2012-11-28 17:07:04.000000000 +0000 --- ./libslp/slp.h.orig 2012-11-28 17:07:04.000000000 +0000
+++ ./libslp/slp.h 2014-02-19 16:51:59.740942446 +0000 +++ ./libslp/slp.h 2014-04-10 14:54:49.731301477 +0000
@@ -606,6 +606,15 @@ SLPEXP SLPError SLPAPI SLPAssociateIP( @@ -606,6 +606,15 @@ SLPEXP SLPError SLPAPI SLPAssociateIP(
SLPHandle hSLP, SLPHandle hSLP,
const char * unicast_ip); const char * unicast_ip);
@ -324,7 +324,7 @@
} }
#endif #endif
--- ./libslpattr/libslpattr.c.orig 2012-12-10 23:31:53.000000000 +0000 --- ./libslpattr/libslpattr.c.orig 2012-12-10 23:31:53.000000000 +0000
+++ ./libslpattr/libslpattr.c 2014-02-19 16:51:59.740942446 +0000 +++ ./libslpattr/libslpattr.c 2014-04-10 14:54:49.731301477 +0000
@@ -393,6 +393,9 @@ static char * unescape_into(char * dest, @@ -393,6 +393,9 @@ static char * unescape_into(char * dest,
(*cur)++; (*cur)++;
} }
@ -336,7 +336,7 @@
return 1; return 1;
} }
--- ./slpd/slpd_database.c.orig 2012-12-10 23:31:53.000000000 +0000 --- ./slpd/slpd_database.c.orig 2012-12-10 23:31:53.000000000 +0000
+++ ./slpd/slpd_database.c 2014-02-19 16:51:59.741942446 +0000 +++ ./slpd/slpd_database.c 2014-04-10 14:54:49.731301477 +0000
@@ -49,6 +49,7 @@ @@ -49,6 +49,7 @@
#define _GNU_SOURCE #define _GNU_SOURCE
@ -620,7 +620,7 @@
/** Cleans up all resources used by the database. /** Cleans up all resources used by the database.
*/ */
--- ./slpd/slpd_database.h.orig 2012-11-28 17:07:04.000000000 +0000 --- ./slpd/slpd_database.h.orig 2012-11-28 17:07:04.000000000 +0000
+++ ./slpd/slpd_database.h 2014-02-19 16:51:59.741942446 +0000 +++ ./slpd/slpd_database.h 2014-04-10 14:54:49.732301459 +0000
@@ -103,7 +103,9 @@ SLPMessage * SLPDDatabaseEnum(void * eh, @@ -103,7 +103,9 @@ SLPMessage * SLPDDatabaseEnum(void * eh,
void SLPDDatabaseEnumEnd(void * eh); void SLPDDatabaseEnumEnd(void * eh);
int SLPDDatabaseIsEmpty(void); int SLPDDatabaseIsEmpty(void);
@ -633,7 +633,7 @@
#ifdef DEBUG #ifdef DEBUG
void SLPDDatabaseDeinit(void); void SLPDDatabaseDeinit(void);
--- ./slpd/slpd_knownda.c.orig 2012-12-10 23:31:53.000000000 +0000 --- ./slpd/slpd_knownda.c.orig 2012-12-10 23:31:53.000000000 +0000
+++ ./slpd/slpd_knownda.c 2014-02-19 16:51:59.741942446 +0000 +++ ./slpd/slpd_knownda.c 2014-04-10 14:54:49.732301459 +0000
@@ -1836,7 +1836,7 @@ void SLPDKnownDARegisterWithAllDas(SLPMe @@ -1836,7 +1836,7 @@ void SLPDKnownDARegisterWithAllDas(SLPMe
/* Returns: None */ /* Returns: None */
/*=========================================================================*/ /*=========================================================================*/
@ -644,7 +644,7 @@
/* Simply echo the message through as is */ /* Simply echo the message through as is */
SLPDKnownDAEcho(msg, buf); SLPDKnownDAEcho(msg, buf);
--- ./slpd/slpd_log.c.orig 2012-11-28 17:07:04.000000000 +0000 --- ./slpd/slpd_log.c.orig 2012-11-28 17:07:04.000000000 +0000
+++ ./slpd/slpd_log.c 2014-02-19 16:51:59.741942446 +0000 +++ ./slpd/slpd_log.c 2014-04-10 14:54:49.732301459 +0000
@@ -298,6 +298,7 @@ static void SLPDLogSrvTypeRqstMessage(SL @@ -298,6 +298,7 @@ static void SLPDLogSrvTypeRqstMessage(SL
{ {
(void)srvtyperqst; (void)srvtyperqst;
@ -654,7 +654,7 @@
/** Logs information about a SrvTypeReply message to the log file. /** Logs information about a SrvTypeReply message to the log file.
--- ./slpd/slpd_main.c.orig 2012-12-10 23:31:53.000000000 +0000 --- ./slpd/slpd_main.c.orig 2012-12-10 23:31:53.000000000 +0000
+++ ./slpd/slpd_main.c 2014-02-19 16:54:07.431942220 +0000 +++ ./slpd/slpd_main.c 2014-04-10 14:54:49.732301459 +0000
@@ -66,6 +66,8 @@ int G_SIGINT; /* Signal being used f @@ -66,6 +66,8 @@ int G_SIGINT; /* Signal being used f
int G_SIGUSR1; /* Signal being used to dump information about the database */ int G_SIGUSR1; /* Signal being used to dump information about the database */
#endif #endif
@ -725,8 +725,8 @@
if (DropPrivileges()) if (DropPrivileges())
SLPDFatal("Could not drop privileges\n"); SLPDFatal("Could not drop privileges\n");
--- ./slpd/slpd_property.c.orig 2012-11-28 17:07:04.000000000 +0000 --- ./slpd/slpd_property.c.orig 2012-11-28 17:07:04.000000000 +0000
+++ ./slpd/slpd_property.c 2014-02-19 16:53:31.407942284 +0000 +++ ./slpd/slpd_property.c 2014-04-10 14:55:49.894966122 +0000
@@ -50,6 +50,23 @@ @@ -50,6 +50,24 @@
*/ */
SLPDProperty G_SlpdProperty; SLPDProperty G_SlpdProperty;
@ -741,6 +741,7 @@
+ memset(&hints, 0, sizeof(hints)); + memset(&hints, 0, sizeof(hints));
+ hints.ai_socktype = SOCK_STREAM; + hints.ai_socktype = SOCK_STREAM;
+ hints.ai_family = AF_UNSPEC; + hints.ai_family = AF_UNSPEC;
+ hints.ai_flags = AI_CANONNAME;
+ if (getaddrinfo(host, 0, &hints, &ifaddr) == 0 && ifaddr->ai_canonname && strchr(ifaddr->ai_canonname, '.') != 0) + if (getaddrinfo(host, 0, &hints, &ifaddr) == 0 && ifaddr->ai_canonname && strchr(ifaddr->ai_canonname, '.') != 0)
+ return xstrdup(ifaddr->ai_canonname); + return xstrdup(ifaddr->ai_canonname);
+ } + }
@ -750,7 +751,7 @@
/** Reinitialize the slpd property management subsystem. /** Reinitialize the slpd property management subsystem.
* *
* Clears and rereads configuration parameters from files into the system. * Clears and rereads configuration parameters from files into the system.
@@ -226,6 +243,9 @@ void SLPDPropertyReinit(void) @@ -226,6 +244,9 @@ void SLPDPropertyReinit(void)
G_SlpdProperty.nextActiveDiscovery = 0; /* ensures xmit on first call to SLPDKnownDAActiveDiscovery() */ G_SlpdProperty.nextActiveDiscovery = 0; /* ensures xmit on first call to SLPDKnownDAActiveDiscovery() */
G_SlpdProperty.nextPassiveDAAdvert = 0; /* ensures xmit on first call to SLPDKnownDAPassiveDiscovery()*/ G_SlpdProperty.nextPassiveDAAdvert = 0; /* ensures xmit on first call to SLPDKnownDAPassiveDiscovery()*/
@ -760,7 +761,7 @@
} }
/** Initialize the slpd property management subsystem. /** Initialize the slpd property management subsystem.
@@ -266,6 +286,7 @@ void SLPDPropertyDeinit(void) @@ -266,6 +287,7 @@ void SLPDPropertyDeinit(void)
xfree(G_SlpdProperty.ifaceInfo.iface_addr); xfree(G_SlpdProperty.ifaceInfo.iface_addr);
xfree(G_SlpdProperty.ifaceInfo.bcast_addr); xfree(G_SlpdProperty.ifaceInfo.bcast_addr);
@ -769,7 +770,7 @@
} }
--- ./slpd/slpd_property.h.orig 2012-11-28 17:07:04.000000000 +0000 --- ./slpd/slpd_property.h.orig 2012-11-28 17:07:04.000000000 +0000
+++ ./slpd/slpd_property.h 2014-02-19 16:51:59.742942446 +0000 +++ ./slpd/slpd_property.h 2014-04-10 14:54:49.732301459 +0000
@@ -73,6 +73,8 @@ typedef struct _SLPDProperty @@ -73,6 +73,8 @@ typedef struct _SLPDProperty
uint16_t port; uint16_t port;
size_t localeLen; size_t localeLen;
@ -780,7 +781,7 @@
int indexingPropertiesSet; /** Indexes are only maintained from startup, int indexingPropertiesSet; /** Indexes are only maintained from startup,
* and may not be switched on and off without * and may not be switched on and off without
--- ./slpd/slpd_regfile.c.orig 2012-12-10 23:31:53.000000000 +0000 --- ./slpd/slpd_regfile.c.orig 2012-12-10 23:31:53.000000000 +0000
+++ ./slpd/slpd_regfile.c 2014-02-19 16:51:59.742942446 +0000 +++ ./slpd/slpd_regfile.c 2014-04-10 14:54:49.732301459 +0000
@@ -130,6 +130,7 @@ int SLPDRegFileReadSrvReg(FILE * fd, SLP @@ -130,6 +130,7 @@ int SLPDRegFileReadSrvReg(FILE * fd, SLP
{ {
char * slider1; char * slider1;
@ -853,7 +854,7 @@
CLEANUP: CLEANUP:
--- ./slpd/slpd_spi.c.orig 2012-11-28 17:07:04.000000000 +0000 --- ./slpd/slpd_spi.c.orig 2012-11-28 17:07:04.000000000 +0000
+++ ./slpd/slpd_spi.c 2014-02-19 16:51:59.742942446 +0000 +++ ./slpd/slpd_spi.c 2014-04-10 14:54:49.733301445 +0000
@@ -66,6 +66,8 @@ int SLPDSpiInit(const char * spifile) @@ -66,6 +66,8 @@ int SLPDSpiInit(const char * spifile)
G_SlpdSpiHandle = 0; G_SlpdSpiHandle = 0;
} }
@ -864,7 +865,7 @@
} }
--- ./slptool/slptool.c.orig 2013-06-08 02:50:38.000000000 +0000 --- ./slptool/slptool.c.orig 2013-06-08 02:50:38.000000000 +0000
+++ ./slptool/slptool.c 2014-02-19 16:51:59.742942446 +0000 +++ ./slptool/slptool.c 2014-04-10 14:54:49.733301445 +0000
@@ -187,7 +187,17 @@ static SLPBoolean mySrvUrlCallback(SLPHa @@ -187,7 +187,17 @@ static SLPBoolean mySrvUrlCallback(SLPHa
(void)cookie; (void)cookie;
@ -913,7 +914,7 @@
printf(" command-and-arguments may be:\n"); printf(" command-and-arguments may be:\n");
printf(" findsrvs service-type [filter]\n"); printf(" findsrvs service-type [filter]\n");
--- ./slptool/slptool.h.orig 2012-11-28 17:07:04.000000000 +0000 --- ./slptool/slptool.h.orig 2012-11-28 17:07:04.000000000 +0000
+++ ./slptool/slptool.h 2014-02-19 16:51:59.742942446 +0000 +++ ./slptool/slptool.h 2014-04-10 14:54:49.733301445 +0000
@@ -107,6 +107,7 @@ typedef struct _SLPToolCommandLine @@ -107,6 +107,7 @@ typedef struct _SLPToolCommandLine
const char * cmdparam1; const char * cmdparam1;
const char * cmdparam2; const char * cmdparam2;

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Apr 10 16:56:24 CEST 2014 - mls@suse.de
- use AI_CANONNAME when looking up the canonical name
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Feb 19 18:37:01 CET 2014 - mls@suse.de Wed Feb 19 18:37:01 CET 2014 - mls@suse.de