SMBFS?

James Van Artsdalen james-freebsd-amd64 at jrv.org
Sat Jan 3 23:14:15 PST 2004


> Is anyone trying to use SMBFS on x86_64?  I'm getting an error I
> don't get on the i386 boxes:

> smbfs: can't get server address: nberr = no interface to broadcast on and no NBNS server specified

> I'm beginning to wonder if there might be a bug instead of just an
> incorrect config file.

In nb_enum_if() in /usr/src/contrib/smbfs/lib/smb/nb_net.c, this code
traverses all of the net interfaces looking for broadcast addresses.

Of interest ifc.ifc_len is 524, but sizeof (struct ifreq) is 32?
Shouldn't the len be an integer multiple of the size of the struct?
I can find no documentation of these ioctl's.  I looked at the bytes
returned by SIOCGIFCONF an it's clearly not what the libsmbfs code
expects, but I don't know what SIOCGIFCONF is really supposed to
return & the structure boundaries in the buffer aren't obvious.

	if (ioctl(s, SIOCGIFCONF, &ifc) != 0) {
		error = errno;
		goto bad;
	} 
	ifrqp = ifc.ifc_req;
	ifcnt = ifc.ifc_len / sizeof(struct ifreq);
	error = 0;
	for (i = 0; i < ifcnt; i++, ifrqp++) {
		if (ioctl(s, SIOCGIFFLAGS, ifrqp) != 0)
			continue;


More information about the freebsd-amd64 mailing list