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

Stefan Metzmacher metze at samba.org
Mon Jan 25 08:06:06 UTC 2016


Hi Michael,

the NDR_PRINT_DEBUG(fsctl_net_iface_info, first); needs to be on
a higher debug level.


+	ret = ioctl(fd, SIOCETHTOOL, &ifr);
+	if (ret == -1) {
+		do {
+			ret = close(fd);
+		} while (ret == -1 && errno == EINTR);
+
+		return;
+	}
+	*speed = (ethtool_cmd_speed(&cmd)) * 1000 * 1000;
+}

We should already close the fd, not only if ioctl fails!

Do we have a sys_close() that already does

+		do {
+			ret = close(fd);
+		} while (ret == -1 && errno == EINTR);

This hight be an generic problem (or is not needed at at all)
@Volker,Jemery: Do we need EINTR on close?

The correct handling for if_index will come later?

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160125/326c7c38/signature.sig>


More information about the samba-technical mailing list