svn commit: samba r25472 - in branches: SAMBA_3_2/source SAMBA_3_2/source/include SAMBA_3_2/source/lib SAMBA_3_2/source/lib/replace SAMBA_3_2/source/lib/replace/system SAMBA_3_2/source/utils SAMBA_3_2_0/source SAMBA_3_2_0/source/include SAMBA_3_2_0/source/lib SAMBA_3_2_0/source/lib/replace SAMBA_3_2_0/source/lib/replace/system SAMBA_3_2_0/source/utils

Jeremy Allison jra at samba.org
Tue Oct 2 20:29:11 GMT 2007


On Tue, Oct 02, 2007 at 04:10:47PM -0400, simo wrote:
> On Tue, 2007-10-02 at 19:27 +0000, jra at samba.org wrote:
> > Author: jra
> > Date: 2007-10-02 19:27:25 +0000 (Tue, 02 Oct 2007)
> > New Revision: 25472
> > 
> > WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25472
> > 
> > Log:
> > Fix the interfaces code to detect IPv6 interfaces, using the
> > new standard getifaddrs() and freeifaddrs() interfaces. Currently
> > we only return IPv4 af_families. Needs fixing for binds to IPv6
> > but this has to be careful work.
> > Jeremy.
> 
> Reviewing the patch.
> 
> This does not look right:
> 
> +static int _get_interfaces(struct iface_struct *ifaces, int
> max_interfaces)
> +{
> +	struct ifaddrs *iflist = NULL;
> +	struct ifaddrs *ifptr = NULL;
> +	int total = 0;
> +
> +	if (getifaddrs(&ifp) < 0) {
> +		return -1;
> +	}
> 
> 
> getifaddrs() references 'ifp', but ifp is not defined here, nor used
> thereafter.
> 
> should probably be iflist instead.

Thanks ! (How did this compile :-).

Jeremy.


More information about the samba-technical mailing list