1994-09-26 19:42:29 +03:00
|
|
|
/* $NetBSD: krpc_subr.c,v 1.7 1994/09/26 16:42:31 gwr Exp $ */
|
1994-06-29 10:39:25 +04:00
|
|
|
|
1994-04-18 10:18:05 +04:00
|
|
|
/*
|
|
|
|
* Copyright (c) 1994 Gordon Ross, Adam Glass
|
|
|
|
* Copyright (c) 1992 Regents of the University of California.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* This software was developed by the Computer Systems Engineering group
|
|
|
|
* at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
|
|
|
|
* contributed to Berkeley.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
* 3. All advertising materials mentioning features or use of this software
|
|
|
|
* must display the following acknowledgement:
|
|
|
|
* This product includes software developed by the University of
|
|
|
|
* California, Lawrence Berkeley Laboratory and its contributors.
|
|
|
|
* 4. Neither the name of the University nor the names of its contributors
|
|
|
|
* may be used to endorse or promote products derived from this software
|
|
|
|
* without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
* SUCH DAMAGE.
|
|
|
|
*
|
|
|
|
* partially based on:
|
|
|
|
* libnetboot/rpc.c
|
|
|
|
* @(#) Header: rpc.c,v 1.12 93/09/28 08:31:56 leres Exp (LBL)
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <sys/param.h>
|
|
|
|
#include <sys/conf.h>
|
|
|
|
#include <sys/ioctl.h>
|
|
|
|
#include <sys/proc.h>
|
|
|
|
#include <sys/mount.h>
|
|
|
|
#include <sys/mbuf.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#include <sys/systm.h>
|
|
|
|
#include <sys/reboot.h>
|
|
|
|
|
|
|
|
#include <net/if.h>
|
|
|
|
#include <netinet/in.h>
|
|
|
|
|
|
|
|
#include <nfs/rpcv2.h>
|
1994-09-26 19:42:29 +03:00
|
|
|
#include <nfs/krpc.h>
|
1994-04-18 10:18:05 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Kernel support for Sun RPC
|
|
|
|
*
|
|
|
|
* Used currently for bootstrapping in nfs diskless configurations.
|
|
|
|
*
|
|
|
|
* Note: will not work on variable-sized rpc args/results.
|
|
|
|
* implicit size-limit of an mbuf.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Generic RPC headers
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct auth_info {
|
|
|
|
int rp_atype; /* auth type */
|
|
|
|
u_long rp_alen; /* auth length */
|
|
|
|
};
|
|
|
|
|
|
|
|
struct rpc_call {
|
|
|
|
u_long rp_xid; /* request transaction id */
|
|
|
|
int rp_direction; /* call direction (0) */
|
|
|
|
u_long rp_rpcvers; /* rpc version (2) */
|
|
|
|
u_long rp_prog; /* program */
|
|
|
|
u_long rp_vers; /* version */
|
|
|
|
u_long rp_proc; /* procedure */
|
|
|
|
struct auth_info rp_auth;
|
|
|
|
struct auth_info rp_verf;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct rpc_reply {
|
|
|
|
u_long rp_xid; /* request transaction id */
|
|
|
|
int rp_direction; /* call direction (1) */
|
|
|
|
int rp_astatus; /* accept status (0: accepted) */
|
|
|
|
union {
|
|
|
|
u_long rpu_errno;
|
|
|
|
struct {
|
|
|
|
struct auth_info rp_auth;
|
|
|
|
u_long rp_rstatus; /* reply status */
|
|
|
|
} rpu_ok;
|
|
|
|
} rp_u;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define MIN_REPLY_HDR 16 /* xid, dir, astat, errno */
|
|
|
|
|
1994-06-13 19:28:55 +04:00
|
|
|
/*
|
|
|
|
* What is the longest we will wait before re-sending a request?
|
|
|
|
* Note this is also the frequency of "RPC timeout" messages.
|
|
|
|
* The re-send loop count sup linearly to this maximum, so the
|
|
|
|
* first complaint will happen after (1+2+3+4+5)=15 seconds.
|
|
|
|
*/
|
|
|
|
#define MAX_RESEND_DELAY 5 /* seconds */
|
|
|
|
|
1994-04-18 10:18:05 +04:00
|
|
|
/*
|
|
|
|
* Call portmap to lookup a port number for a particular rpc program
|
1994-06-13 19:28:55 +04:00
|
|
|
* Returns non-zero error on failure.
|
1994-04-18 10:18:05 +04:00
|
|
|
*/
|
|
|
|
int
|
1994-09-26 19:42:29 +03:00
|
|
|
krpc_portmap(sin, prog, vers, portp)
|
|
|
|
struct sockaddr_in *sin; /* server address */
|
1994-04-18 10:18:05 +04:00
|
|
|
u_long prog, vers; /* host order */
|
|
|
|
u_short *portp; /* network order */
|
|
|
|
{
|
|
|
|
struct sdata {
|
|
|
|
u_long prog; /* call program */
|
|
|
|
u_long vers; /* call version */
|
|
|
|
u_long proto; /* call protocol */
|
|
|
|
u_long port; /* call port (unused) */
|
|
|
|
} *sdata;
|
|
|
|
struct rdata {
|
|
|
|
u_short pad;
|
|
|
|
u_short port;
|
|
|
|
} *rdata;
|
|
|
|
struct mbuf *m;
|
|
|
|
int error;
|
|
|
|
|
|
|
|
/* The portmapper port is fixed. */
|
|
|
|
if (prog == PMAPPROG) {
|
|
|
|
*portp = htons(PMAPPORT);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
1994-06-13 19:28:55 +04:00
|
|
|
m = m_gethdr(M_WAIT, MT_DATA);
|
1994-04-18 10:18:05 +04:00
|
|
|
if (m == NULL)
|
|
|
|
return ENOBUFS;
|
|
|
|
m->m_len = sizeof(*sdata);
|
1994-06-13 19:28:55 +04:00
|
|
|
m->m_pkthdr.len = m->m_len;
|
1994-04-18 10:18:05 +04:00
|
|
|
sdata = mtod(m, struct sdata *);
|
|
|
|
|
|
|
|
/* Do the RPC to get it. */
|
|
|
|
sdata->prog = htonl(prog);
|
|
|
|
sdata->vers = htonl(vers);
|
|
|
|
sdata->proto = htonl(IPPROTO_UDP);
|
|
|
|
sdata->port = 0;
|
|
|
|
|
1994-09-26 19:42:29 +03:00
|
|
|
sin->sin_port = htons(PMAPPORT);
|
|
|
|
error = krpc_call(sin, PMAPPROG, PMAPVERS,
|
|
|
|
PMAPPROC_GETPORT, &m, NULL);
|
1994-04-18 10:18:05 +04:00
|
|
|
if (error)
|
|
|
|
return error;
|
|
|
|
|
|
|
|
rdata = mtod(m, struct rdata *);
|
|
|
|
*portp = rdata->port;
|
|
|
|
|
|
|
|
m_freem(m);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Do a remote procedure call (RPC) and wait for its reply.
|
1994-09-26 19:42:29 +03:00
|
|
|
* If from_p is non-null, then we are doing broadcast, and
|
|
|
|
* the address from whence the response came is saved there.
|
1994-04-18 10:18:05 +04:00
|
|
|
*/
|
|
|
|
int
|
1994-09-26 19:42:29 +03:00
|
|
|
krpc_call(sa, prog, vers, func, data, from_p)
|
|
|
|
struct sockaddr_in *sa;
|
1994-04-18 10:18:05 +04:00
|
|
|
u_long prog, vers, func;
|
|
|
|
struct mbuf **data; /* input/output */
|
1994-09-26 19:42:29 +03:00
|
|
|
struct mbuf **from_p; /* output */
|
1994-04-18 10:18:05 +04:00
|
|
|
{
|
|
|
|
struct socket *so;
|
|
|
|
struct sockaddr_in *sin;
|
1994-09-26 19:42:29 +03:00
|
|
|
struct mbuf *m, *nam, *mhead, *from;
|
1994-04-18 10:18:05 +04:00
|
|
|
struct rpc_call *call;
|
|
|
|
struct rpc_reply *reply;
|
|
|
|
struct uio auio;
|
|
|
|
int error, rcvflg, timo, secs, len;
|
|
|
|
static u_long xid = ~0xFF;
|
1994-08-12 02:25:32 +04:00
|
|
|
u_short tport;
|
1994-04-18 10:18:05 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Validate address family.
|
|
|
|
* Sorry, this is INET specific...
|
|
|
|
*/
|
1994-09-26 19:42:29 +03:00
|
|
|
if (sa->sin_family != AF_INET)
|
1994-04-18 10:18:05 +04:00
|
|
|
return (EAFNOSUPPORT);
|
|
|
|
|
|
|
|
/* Free at end if not null. */
|
|
|
|
nam = mhead = NULL;
|
1994-09-26 19:42:29 +03:00
|
|
|
from = NULL;
|
1994-04-18 10:18:05 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Create socket and set its recieve timeout.
|
|
|
|
*/
|
|
|
|
if ((error = socreate(AF_INET, &so, SOCK_DGRAM, 0)))
|
|
|
|
goto out;
|
|
|
|
|
|
|
|
m = m_get(M_WAIT, MT_SOOPTS);
|
|
|
|
if (m == NULL) {
|
|
|
|
error = ENOBUFS;
|
|
|
|
goto out;
|
1994-09-26 19:42:29 +03:00
|
|
|
} else {
|
|
|
|
struct timeval *tv;
|
|
|
|
tv = mtod(m, struct timeval *);
|
|
|
|
m->m_len = sizeof(*tv);
|
|
|
|
tv->tv_sec = 1;
|
|
|
|
tv->tv_usec = 0;
|
|
|
|
if ((error = sosetopt(so, SOL_SOCKET, SO_RCVTIMEO, m)))
|
|
|
|
goto out;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Enable broadcast if necessary.
|
|
|
|
*/
|
|
|
|
if (from_p) {
|
|
|
|
int *on;
|
|
|
|
m = m_get(M_WAIT, MT_SOOPTS);
|
|
|
|
if (m == NULL) {
|
|
|
|
error = ENOBUFS;
|
|
|
|
goto out;
|
|
|
|
}
|
|
|
|
on = mtod(m, int *);
|
|
|
|
m->m_len = sizeof(*on);
|
|
|
|
*on = 1;
|
|
|
|
if ((error = sosetopt(so, SOL_SOCKET, SO_BROADCAST, m)))
|
|
|
|
goto out;
|
1994-04-18 10:18:05 +04:00
|
|
|
}
|
|
|
|
|
1994-08-12 02:25:32 +04:00
|
|
|
/*
|
|
|
|
* Bind the local endpoint to a reserved port,
|
|
|
|
* because some NFS servers refuse requests from
|
|
|
|
* non-reserved (non-privileged) ports.
|
|
|
|
*/
|
|
|
|
m = m_getclr(M_WAIT, MT_SONAME);
|
|
|
|
sin = mtod(m, struct sockaddr_in *);
|
|
|
|
sin->sin_len = m->m_len = sizeof(*sin);
|
|
|
|
sin->sin_family = AF_INET;
|
|
|
|
sin->sin_addr.s_addr = INADDR_ANY;
|
|
|
|
tport = IPPORT_RESERVED;
|
|
|
|
do {
|
|
|
|
tport--;
|
|
|
|
sin->sin_port = htons(tport);
|
|
|
|
error = sobind(so, m);
|
|
|
|
} while (error == EADDRINUSE &&
|
|
|
|
tport > IPPORT_RESERVED / 2);
|
|
|
|
m_freem(m);
|
|
|
|
if (error) {
|
|
|
|
printf("bind failed\n");
|
|
|
|
goto out;
|
|
|
|
}
|
|
|
|
|
1994-04-18 10:18:05 +04:00
|
|
|
/*
|
|
|
|
* Setup socket address for the server.
|
|
|
|
*/
|
|
|
|
nam = m_get(M_WAIT, MT_SONAME);
|
|
|
|
if (nam == NULL) {
|
|
|
|
error = ENOBUFS;
|
|
|
|
goto out;
|
|
|
|
}
|
|
|
|
sin = mtod(nam, struct sockaddr_in *);
|
1994-09-26 19:42:29 +03:00
|
|
|
bcopy((caddr_t)sa, (caddr_t)sin, (nam->m_len = sa->sin_len));
|
1994-04-18 10:18:05 +04:00
|
|
|
|
|
|
|
/*
|
1994-06-13 19:28:55 +04:00
|
|
|
* Prepend RPC message header.
|
1994-04-18 10:18:05 +04:00
|
|
|
*/
|
1994-06-13 19:28:55 +04:00
|
|
|
m = *data;
|
|
|
|
*data = NULL;
|
|
|
|
#ifdef DIAGNOSTIC
|
|
|
|
if ((m->m_flags & M_PKTHDR) == 0)
|
|
|
|
panic("krpc_call: send data w/o pkthdr");
|
|
|
|
if (m->m_pkthdr.len < m->m_len)
|
|
|
|
panic("krpc_call: pkthdr.len not set");
|
|
|
|
#endif
|
|
|
|
mhead = m_prepend(m, sizeof(*call), M_WAIT);
|
1994-04-18 10:18:05 +04:00
|
|
|
if (mhead == NULL) {
|
|
|
|
error = ENOBUFS;
|
|
|
|
goto out;
|
|
|
|
}
|
1994-06-13 19:28:55 +04:00
|
|
|
mhead->m_pkthdr.len += sizeof(*call);
|
|
|
|
mhead->m_pkthdr.rcvif = NULL;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Fill in the RPC header
|
|
|
|
*/
|
1994-04-18 10:18:05 +04:00
|
|
|
call = mtod(mhead, struct rpc_call *);
|
|
|
|
bzero((caddr_t)call, sizeof(*call));
|
1994-09-26 19:42:29 +03:00
|
|
|
xid++;
|
|
|
|
call->rp_xid = htonl(xid);
|
1994-04-18 10:18:05 +04:00
|
|
|
/* call->rp_direction = 0; */
|
|
|
|
call->rp_rpcvers = htonl(2);
|
|
|
|
call->rp_prog = htonl(prog);
|
|
|
|
call->rp_vers = htonl(vers);
|
|
|
|
call->rp_proc = htonl(func);
|
|
|
|
/* call->rp_auth = 0; */
|
|
|
|
/* call->rp_verf = 0; */
|
|
|
|
|
|
|
|
/*
|
1994-06-13 19:28:55 +04:00
|
|
|
* Send it, repeatedly, until a reply is received,
|
|
|
|
* but delay each re-send by an increasing amount.
|
|
|
|
* If the delay hits the maximum, start complaining.
|
1994-04-18 10:18:05 +04:00
|
|
|
*/
|
|
|
|
timo = 0;
|
|
|
|
for (;;) {
|
|
|
|
/* Send RPC request (or re-send). */
|
|
|
|
m = m_copym(mhead, 0, M_COPYALL, M_WAIT);
|
1994-06-13 19:28:55 +04:00
|
|
|
if (m == NULL) {
|
|
|
|
error = ENOBUFS;
|
|
|
|
goto out;
|
|
|
|
}
|
1994-04-18 10:18:05 +04:00
|
|
|
error = sosend(so, nam, NULL, m, NULL, 0);
|
1994-06-13 19:28:55 +04:00
|
|
|
if (error) {
|
|
|
|
printf("krpc_call: sosend: %d\n", error);
|
1994-04-18 10:18:05 +04:00
|
|
|
goto out;
|
1994-06-13 19:28:55 +04:00
|
|
|
}
|
1994-04-18 10:18:05 +04:00
|
|
|
m = NULL;
|
|
|
|
|
1994-06-13 19:28:55 +04:00
|
|
|
/* Determine new timeout. */
|
|
|
|
if (timo < MAX_RESEND_DELAY)
|
1994-04-18 10:18:05 +04:00
|
|
|
timo++;
|
|
|
|
else
|
1994-06-13 19:28:55 +04:00
|
|
|
printf("RPC timeout for server 0x%x\n",
|
1994-04-18 10:18:05 +04:00
|
|
|
ntohl(sin->sin_addr.s_addr));
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Wait for up to timo seconds for a reply.
|
|
|
|
* The socket receive timeout was set to 1 second.
|
|
|
|
*/
|
|
|
|
secs = timo;
|
|
|
|
while (secs > 0) {
|
1994-09-26 19:42:29 +03:00
|
|
|
if (from) {
|
|
|
|
m_freem(from);
|
|
|
|
from = NULL;
|
|
|
|
}
|
|
|
|
if (m) {
|
|
|
|
m_freem(m);
|
|
|
|
m = NULL;
|
|
|
|
}
|
1994-04-18 10:18:05 +04:00
|
|
|
auio.uio_resid = len = 1<<16;
|
|
|
|
rcvflg = 0;
|
1994-09-26 19:42:29 +03:00
|
|
|
error = soreceive(so, &from, &auio, &m, NULL, &rcvflg);
|
1994-04-18 10:18:05 +04:00
|
|
|
if (error == EWOULDBLOCK) {
|
|
|
|
secs--;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if (error)
|
|
|
|
goto out;
|
|
|
|
len -= auio.uio_resid;
|
|
|
|
|
1994-09-26 19:42:29 +03:00
|
|
|
/* Does the reply contain at least a header? */
|
|
|
|
if (len < MIN_REPLY_HDR)
|
|
|
|
continue;
|
|
|
|
if (m->m_len < MIN_REPLY_HDR)
|
|
|
|
continue;
|
|
|
|
reply = mtod(m, struct rpc_reply *);
|
|
|
|
|
|
|
|
/* Is it the right reply? */
|
|
|
|
if (reply->rp_direction != htonl(RPC_REPLY))
|
|
|
|
continue;
|
|
|
|
|
|
|
|
if (reply->rp_xid != htonl(xid))
|
|
|
|
continue;
|
|
|
|
|
|
|
|
/* Was RPC accepted? (authorization OK) */
|
|
|
|
if (reply->rp_astatus != 0) {
|
|
|
|
error = ntohl(reply->rp_u.rpu_errno);
|
|
|
|
printf("rpc denied, error=%d\n", error);
|
1994-04-18 10:18:05 +04:00
|
|
|
continue;
|
|
|
|
}
|
1994-09-26 19:42:29 +03:00
|
|
|
|
|
|
|
/* Did the call succeed? */
|
|
|
|
if ((error = ntohl(reply->rp_u.rpu_ok.rp_rstatus)) != 0) {
|
|
|
|
printf("rpc status=%d\n", error);
|
|
|
|
continue;
|
1994-04-18 10:18:05 +04:00
|
|
|
}
|
1994-09-26 19:42:29 +03:00
|
|
|
|
|
|
|
goto gotreply; /* break two levels */
|
|
|
|
|
1994-04-18 10:18:05 +04:00
|
|
|
} /* while secs */
|
|
|
|
} /* forever send/receive */
|
1994-06-30 14:45:03 +04:00
|
|
|
|
|
|
|
error = ETIMEDOUT;
|
|
|
|
goto out;
|
|
|
|
|
1994-04-18 10:18:05 +04:00
|
|
|
gotreply:
|
|
|
|
|
|
|
|
/*
|
1994-08-12 02:25:32 +04:00
|
|
|
* Pull as much as we can into first mbuf, to make
|
|
|
|
* result buffer contiguous. Note that if the entire
|
1994-08-12 08:31:51 +04:00
|
|
|
* result won't fit into one mbuf, you're out of luck.
|
1994-08-12 02:25:32 +04:00
|
|
|
* XXX - Should not rely on making the entire reply
|
|
|
|
* contiguous (fix callers instead). -gwr
|
1994-06-13 19:28:55 +04:00
|
|
|
*/
|
|
|
|
#ifdef DIAGNOSTIC
|
|
|
|
if ((m->m_flags & M_PKTHDR) == 0)
|
|
|
|
panic("krpc_call: received pkt w/o header?");
|
|
|
|
#endif
|
|
|
|
len = m->m_pkthdr.len;
|
|
|
|
if (m->m_len < len) {
|
|
|
|
m = m_pullup(m, len);
|
|
|
|
if (m == NULL) {
|
|
|
|
error = ENOBUFS;
|
|
|
|
goto out;
|
|
|
|
}
|
1994-09-26 19:42:29 +03:00
|
|
|
reply = mtod(m, struct rpc_reply *);
|
1994-06-13 19:28:55 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Strip RPC header
|
|
|
|
*/
|
1994-04-18 10:18:05 +04:00
|
|
|
len = sizeof(*reply);
|
|
|
|
if (reply->rp_u.rpu_ok.rp_auth.rp_atype != 0) {
|
|
|
|
len += ntohl(reply->rp_u.rpu_ok.rp_auth.rp_alen);
|
|
|
|
len = (len + 3) & ~3; /* XXX? */
|
|
|
|
}
|
|
|
|
m_adj(m, len);
|
1994-06-13 19:28:55 +04:00
|
|
|
|
1994-04-18 10:18:05 +04:00
|
|
|
/* result */
|
|
|
|
*data = m;
|
1994-09-26 19:42:29 +03:00
|
|
|
if (from_p) {
|
|
|
|
*from_p = from;
|
|
|
|
from = NULL;
|
|
|
|
}
|
1994-04-18 10:18:05 +04:00
|
|
|
|
|
|
|
out:
|
|
|
|
if (nam) m_freem(nam);
|
|
|
|
if (mhead) m_freem(mhead);
|
1994-09-26 19:42:29 +03:00
|
|
|
if (from) m_freem(from);
|
1994-04-18 10:18:05 +04:00
|
|
|
soclose(so);
|
|
|
|
return error;
|
|
|
|
}
|