[PATCHES] multi-channel: implement network interface info ioctl

Michael Adam obnox at samba.org
Mon Jan 25 13:02:01 UTC 2016


On 2016-01-25 at 18:29 +0530, Anoop C S wrote:
> On Mon, 2016-01-25 at 13:09 +0100, Michael Adam wrote:
> > Updated complete patchset attached:
> > 
> > - correctly (according to current samba) translate NOT_SUPPORTED
> >   into NT_STATUS_FS_DRIVER_REQUIRED or
> >   NT_STATUS_INVALID_DEVICE_REQUEST
> > 
> > - get if_index from the kernel
> > - make it possible to override from the config
> > - fall back to calculation 0x80000000 + count as suggested
> >   if neither in kernel nor in config
> > 
> 
> Correct me if I am wrong in understanding the modified patch (v3).
> 
> Assuming 'interfaces = ' parameter line is not specified in smb.conf,
> consider the case where we failed to retrieve interface index via the
> following lines of code:
> 
> +	ifaces[total].if_index = if_nametoindex(ifptr->ifa_name);
> +	if (ifaces[total].if_index == 0) {
> +		DBG_ERR("Failed to retrieve interface index for '%s':
> "
> +			"%s\n", ifptr->ifa_name, strerror(errno));
> +		}
> +
> 
> Will we keep if_index as 0 itself? If not we have to fill if_index with
> a compiled in (non-colliding) default value as we did inside
> interpret_interface().

Yeah, doing exactly this currently... :-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160125/7ce8ca98/signature.sig>


More information about the samba-technical mailing list