}
if (clnt_ping(saddr, prog, *p_vers, *p_prot, NULL))
goto out_ok;
- if (rpc_createerr.cf_stat == RPC_TIMEDOUT)
- goto out_bad;
}
}
if (rpc_createerr.cf_stat != RPC_PROGNOTREGISTERED &&
+ rpc_createerr.cf_stat != RPC_TIMEDOUT &&
rpc_createerr.cf_stat != RPC_PROGVERSMISMATCH)
goto out_bad;
continue;
p_prot = protos;
}
+ if (rpc_createerr.cf_stat == RPC_TIMEDOUT)
+ goto out_bad;
+
if (vers || !*++p_vers)
break;
}
option = po_get(options, "mountvers");
if (option)
mnt_server.pmap.pm_vers = atoi(option);
+ option = po_get(options, "mountproto");
+ if (option) {
+ if (strcmp(option, "tcp") == 0) {
+ mnt_server.pmap.pm_prot = IPPROTO_TCP;
+ po_remove_all(options, "mountproto");
+ }
+ if (strcmp(option, "udp") == 0) {
+ mnt_server.pmap.pm_prot = IPPROTO_UDP;
+ po_remove_all(options, "mountproto");
+ }
+ }
option = po_get(options, "port");
if (option) {
}
+ if (mnt_server.pmap.pm_prot == IPPROTO_TCP)
+ snprintf(new_option, sizeof(new_option) - 1,
+ "mountproto=tcp");
+ else
+ snprintf(new_option, sizeof(new_option) - 1,
+ "mountproto=udp");
+ if (po_append(options, new_option) == PO_FAILED)
+ goto err;
+
+ snprintf(new_option, sizeof(new_option) - 1,
+ "mountport=%lu", mnt_server.pmap.pm_port);
+ if (po_append(options, new_option) == PO_FAILED)
+ goto err;
+
errno = 0;
return options;