It's been a while since I worked on that part of the code.

 

I'm not quite sure why the config parsing was changed from using inet_pton
to getaddrinfo, probably to be more flexible with what form the option
string can take.

 

It really should just take the first result, or look for the SOCK_STREAM
result (but the address that it is copying should be the same for all
anyway).

 

I think you could just patch the code to ignore the extra formats and not
break anything.

 

I've responded including the nfs-ganesha-devel list which is the best place
to get help with Ganesha since all the developers hang out there.

 

Frank

 

 

 

From: Glen Taylor [mailto:gtay...@thegeneral.com] 
Sent: Monday, June 22, 2015 10:08 AM
To: 'ffilz...@mindspring.com'
Subject: Bind_addr in nfs-ganesha - "Multiple addresses for..."

 

As best I can tell, you introduced the original feature allowing nfs-ganesha
to bind to a specific IPv4 address (NFS_CORE_PARAM->Bind_addr).  I was
thrilled to find this option (rather than firewalling IPs I didn't want),
but I have been unable to get this to work on any system because it always
fails with the config error "Multiple addresses found for [IP_ADDR]".  This
validation check is in config_parsing.c here:

 

https://github.com/nfs-ganesha/nfs-ganesha/blob/master/src/config_parsing/co
nfig_parsing.c#L591

 

I get the same result even if I specify the default value of "0.0.0.0" for
that parm.  I'm not set up to debug this in C, but when I call Python
<https://docs.python.org/2/library/socket.html#socket.getaddrinfo> 's
"getaddrinfo()" with the desired IP addr it gets 4 results, but they all
have the same IP/port combination:

 

[root@pgclnxvhost01 yum.repos.d]# python

Python 2.7.5 (default, Feb 11 2014, 07:46:25)

>>> import socket

>>> socket.getaddrinfo('192.168.42.203', 'nfs')

[(2, 1, 6, '', ('192.168.42.203', 2049)), (2, 2, 17, '', ('192.168.42.203',
2049)), (2, 1, 132, '', ('192.168.42.203', 2049)), (2, 5, 132, '',
('192.168.42.203', 2049))]

 

 

The differences seem to be things like datagram vs. stream, etc.  Does this
check perhaps need to be augmented to allow this to pass if all the
getaddrinfo() results are the same IP address that it'll proceed without
error?  Or is there some other way to work around this check?

 

Thanks in advance, and my apologies if you're the wrong person to ask this
of.

 

Glen Tayor

Web Systems Architect

The General Insurance

gtay...@thegeneral.com <mailto:gtay...@thegeneral.com> 

 

 

------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel

Reply via email to