summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
83a8da6)
Use a connected port when talking to portmap via UDP.
This allows us to get ICMP errors reported back so we can avoid
timeouts. Also catch the error (RPC_CANTRECV) properly in getport.
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
bind_saddr = *saddr;
bind_saddr.sin_port = htons(PMAPPORT);
bind_saddr = *saddr;
bind_saddr.sin_port = htons(PMAPPORT);
- socket = get_socket(&bind_saddr, proto, PMAP_TIMEOUT, FALSE, FALSE);
+ socket = get_socket(&bind_saddr, proto, PMAP_TIMEOUT, FALSE, TRUE);
if (socket == RPC_ANYSOCK) {
if (proto == IPPROTO_TCP &&
rpc_createerr.cf_error.re_errno == ETIMEDOUT)
if (socket == RPC_ANYSOCK) {
if (proto == IPPROTO_TCP &&
rpc_createerr.cf_error.re_errno == ETIMEDOUT)
}
if (rpc_createerr.cf_stat != RPC_PROGNOTREGISTERED &&
rpc_createerr.cf_stat != RPC_TIMEDOUT &&
}
if (rpc_createerr.cf_stat != RPC_PROGNOTREGISTERED &&
rpc_createerr.cf_stat != RPC_TIMEDOUT &&
+ rpc_createerr.cf_stat != RPC_CANTRECV &&
rpc_createerr.cf_stat != RPC_PROGVERSMISMATCH)
goto out_bad;
rpc_createerr.cf_stat != RPC_PROGVERSMISMATCH)
goto out_bad;
continue;
p_prot = protos;
}
continue;
p_prot = protos;
}
- if (rpc_createerr.cf_stat == RPC_TIMEDOUT)
+ if (rpc_createerr.cf_stat == RPC_TIMEDOUT ||
+ rpc_createerr.cf_stat == RPC_CANTRECV)
goto out_bad;
if (vers || !*++p_vers)
goto out_bad;
if (vers || !*++p_vers)