asize = sizeof(saddr);
sock = 0;
- _rpcfdtype = 0;
if (getsockname(0, (struct sockaddr *) &saddr, &asize) == 0) {
int ssize = sizeof (int);
+ _rpcfdtype = 0;
if (saddr.sin_family != AF_INET)
xlog(L_FATAL, "init: stdin is bound to non-inet addr");
if (getsockopt(0, SOL_SOCKET, SO_TYPE,
static SVCXPRT *last_transp = NULL;
if (_rpcfdtype == 0) {
- if (last_transp && last_transp->xp_port == defport) {
+ if (last_transp
+ && (!defport || defport == last_transp->xp_port)) {
transp = last_transp;
goto udp_transport;
}
static SVCXPRT *last_transp = NULL;
if (_rpcfdtype == 0) {
- if (last_transp && last_transp->xp_port == defport) {
+ if (last_transp
+ && (!defport || defport == last_transp->xp_port)) {
transp = last_transp;
goto tcp_transport;
}