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

Anoop C S anoopcs at redhat.com
Mon Jan 25 12:59:37 UTC 2016

On Mon, 2016-01-25 at 13:09 +0100, Michael Adam wrote:
> Updated complete patchset attached:
> - correctly (according to current samba) translate NOT_SUPPORTED
> - 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

--Anoop C S.

More information about the samba-technical mailing list