Package: portmap
Version: 5-9

I was experiencing a problem on our systems while trying to mount some nfs 
filesystems.  The error I was getting the kernel logs were as follows:

Mar 14 09:27:11 kernel: lockd_up: makesock failed, error=-13 
Mar 14 09:27:12 kernel: lockd_up: no pid, 2 users?? 
Mar 14 09:27:12 kernel: lockd_up: no pid, 3 users?? 
Mar 14 09:27:12 kernel: lockd_up: no pid, 4 users?? 

There were no error messages from portmap during system bootup because syslog 
had not started before the nfs volumes were being mounted.  I rebooted with the 
nfs mount points commented out of the fstab file, then tried to mount the nfs 
volumes again.  This time, I got a number of the following errors in the 
daemon.log:

Mar 14 10:01:18 portmap[6681]: connect from 127.0.0.1 to set(nlockmgr): request 
from non-local host


After debugging, I found that the ioctl(socket,SIOCGIFCONF...) system call in 
from_local.c was using a fixed size buffer of 8kB, and each interface returns 
32 bytes worth of data.   This allows portmap to detect 256 local ip addresses 
on a given machine.  These particular machines have 257 interfaces, and so on 
some machines the loopback interface was not being detected properly as a local 
ip address (the interesting thing is that we have 13 machines with identical 
configuration, and the same kernel, and only 2 of the machines were showing 
this behaviour).

The attatched patch will cause the portmap daemon to use a more dynamic buffer 
to allow the portmap daemon to allocate the correct number of local addresses 
on machines with >256 local ip addresses.

Regards

Steven

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.2.2/280 - Release Date: 13/03/2006
 
  

Attachment: portmap-lotsofinterfaces.patch
Description: portmap-lotsofinterfaces.patch

Reply via email to