aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormaximilian attems <max@stro.at>2007-08-04 23:08:22 +0200
committermaximilian attems <max@stro.at>2007-08-04 23:08:40 +0200
commit0098b1279e9c135da85f52451af36657d1c62e4a (patch)
tree242011bce872d3cfd9dba15f7ea9e7b12c37b931
parentea15a40ea78bb1be2a9b086e110f6675bdfaa03c (diff)
downloadklibc-0098b1279e9c135da85f52451af36657d1c62e4a.tar.gz
nfsmount: fix rpc header lengthklibc-1.5.1
nfsmount sends bad rpc header in portmap calls. The length in rpc header should be only the length of data without header (nfsmount sends the length including 4 byte header). Portmap in Fedora 7 does not like this. This change in sunrpc.c:rpc_header fixed it see http://bugs.debian.org/428832 tested on a qemu debian setup with nfs root. Signed-off-by: maximilian attems <max@stro.at>
-rw-r--r--usr/kinit/nfsmount/sunrpc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/kinit/nfsmount/sunrpc.c b/usr/kinit/nfsmount/sunrpc.c
index 915d412988988..6607cf7233aed 100644
--- a/usr/kinit/nfsmount/sunrpc.c
+++ b/usr/kinit/nfsmount/sunrpc.c
@@ -55,7 +55,7 @@ static void rpc_header(struct client *clnt, struct rpc *rpc)
{
(void)clnt;
- rpc->call->hdr.frag_hdr = htonl(LAST_FRAG | rpc->call_len);
+ rpc->call->hdr.frag_hdr = htonl(LAST_FRAG | (rpc->call_len - 4));
rpc->call->hdr.udp.xid = lrand48();
rpc->call->hdr.udp.msg_type = htonl(RPC_CALL);
rpc->call->rpc_vers = htonl(2);