#73 rpc.rquotad does not support IPv6

open
nobody
None
5
2011-01-12
2011-01-12
Petr Písař
No

$ rpcinfo
program version netid address service owner
[...]
100011 1 udp 0.0.0.0.3.107 rquotad superuser
100011 2 udp 0.0.0.0.3.107 rquotad superuser
100011 1 tcp 0.0.0.0.3.107 rquotad superuser
100011 2 tcp 0.0.0.0.3.107 rquotad superuser

# mount -o quota,vers=4 [::1]:/mnt/quotaext3/ /mnt/nfs/quotaext3/

$ grep vers=4 /proc/mounts
::1:/mnt/quotaext3/ /mnt/nfs/quotaext3 nfs4 rw,relatime,vers=4,rsize=524288,wsize=524288,namlen=255,hard,proto=tcp6,port=0,timeo=600,retrans=2,sec=sys,clientaddr=::1,minorversion=0,addr=::1 0 0

$ quota -v -f /mnt/nfs/quotaext3/
quota: error while getting quota from ::1:/mnt/quotaext3/ for petr (id 500): Connection refused

I identified three problems till now:

(1) RPC service does not listen on IPv6 (see the rpcinfo output)
(2) Linux does not escape IPv6 with brackets in /proc/mounts
(3) rpc_rquota_get() in rquota_client.c:137 searches for first colon:
if ((pathname = strchr(fsname_tmp, ':')) == (char *)0 || *(pathname + 1) == '(') {
free(fsname_tmp);
return -ENOENT;
}

Discussion

  • Jan Kara
    Jan Kara
    2011-02-16

    I did some research on this. So (2) is not problem - kernel needs to be fixed but that's reasonably simple as I had a look at that code. (3) is trivial to fix once (2) is done. In fact I already fixed (3) in rquota_client.c. But (1) does not seem to be completely trivial. TIRPC library has to be used instead of GLIBC RPC support. But I have to yet find out how to properly utilize this library because some initial experiments are not successful ;)

     


Anonymous


Cancel   Add attachments