Dirk Mueller
868d58656c
- Fixed rpc broadcast handling (bnc#857324) Upgraded to upstream 0.2.1-rc4 as part of this, and rebased the patch set. OBS-URL: https://build.opensuse.org/request/show/215477 OBS-URL: https://build.opensuse.org/package/show/network/rpcbind?expand=0&rev=32
51 lines
1.4 KiB
Diff
51 lines
1.4 KiB
Diff
From 2dbc060dd45240216ae37217690f974f57a653f6 Mon Sep 17 00:00:00 2001
|
|
From: Olaf Kirch <okir@suse.de>
|
|
Date: Tue, 20 Aug 2013 09:11:45 +0200
|
|
Subject: [PATCH 06/24] In init_transport, move creation of COTS sockets
|
|
closer to where they are used
|
|
|
|
Signed-off-by: Olaf Kirch <okir@suse.de>
|
|
---
|
|
src/rpcbind.c | 18 ++++++------------
|
|
1 file changed, 6 insertions(+), 12 deletions(-)
|
|
|
|
diff --git a/src/rpcbind.c b/src/rpcbind.c
|
|
index 7ed72bc..f562f7a 100644
|
|
--- a/src/rpcbind.c
|
|
+++ b/src/rpcbind.c
|
|
@@ -309,18 +309,6 @@ init_transport(struct netconfig *nconf)
|
|
}
|
|
#endif
|
|
|
|
- /*
|
|
- * XXX - using RPC library internal functions. For NC_TPI_CLTS
|
|
- * we call this later, for each socket we like to bind.
|
|
- */
|
|
- if (nconf->nc_semantics != NC_TPI_CLTS) {
|
|
- if ((fd = __rpc_nconf2fd(nconf)) < 0) {
|
|
- syslog(LOG_ERR, "cannot create socket for %s",
|
|
- nconf->nc_netid);
|
|
- return (1);
|
|
- }
|
|
- }
|
|
-
|
|
if (!__rpc_nconf2sockinfo(nconf, &si)) {
|
|
syslog(LOG_ERR, "cannot get information for %s",
|
|
nconf->nc_netid);
|
|
@@ -487,6 +475,12 @@ init_transport(struct netconfig *nconf)
|
|
if (!checkbind)
|
|
return 1;
|
|
} else { /* NC_TPI_COTS */
|
|
+ if ((fd = __rpc_nconf2fd(nconf)) < 0) {
|
|
+ syslog(LOG_ERR, "cannot create socket for %s",
|
|
+ nconf->nc_netid);
|
|
+ return (1);
|
|
+ }
|
|
+
|
|
if ((strcmp(nconf->nc_netid, "local") != 0) &&
|
|
(strcmp(nconf->nc_netid, "unix") != 0)) {
|
|
if ((aicode = getaddrinfo(NULL, servname, &hints, &res))!= 0) {
|
|
--
|
|
1.7.12.4
|
|
|