PATCH: Support client binding to local IP and/or network devices.

Ben Greear greearb at candelatech.com
Fri Jul 21 01:24:37 GMT 2006


Ben Greear wrote:
> I have completed the first draft of the patch to allow binding to
> local addresses.  Many of the binaries do not fully support this
> option since I did not know a clean way to get the config info to them,
> and didn't think it was really required for my needs.  As far as I can 
> tell,
> the libraries are well supported, so the applications can have support
> added as needed.  smbmount and a few others *do* support the new options,
> and I have tested that smbmount works as I had hoped.
> 
> The patch at the location below enables this behaviour:
> http://www.candelatech.com/oss/samba_local_bind.patch

Per some feedback, I have added support to the cifs kernel file system
and the mount.cifs.  The new samba patch is here:

http://www.candelatech.com/oss/samba_local_bind3.patch

The kernel patch is here:
http://www.candelatech.com/oss/cifs_local_bind.patch

Note that in my previous email, I had some typos in the comments below..namely
I had 173.X in a few places, when it should have been 172.X.

Thanks,
Ben

> 
> SMB client machine:
> eth0 IP:  172.2.2.230  netmask 255.255.255.0
> eth1 IP:  172.2.2.231  netmask 255.255.255.0
> eth2 IP:  172.2.2.232  netmask 255.255.255.0
> ...
> 
> local mount dirs:
> /mnt/smb1
> /mnt/smb2
> /mnt/smb3
> ....
> 
> SMB server is exporting share 'samba'
> 
> I want to stress the SMB server as if many SMB clients are connecting.
> I can make arbitrarily many of the (virtual) interfaces on the client,
> but when mounting the SMB server, I want each mount point to use a specific
> interface and local IP.
> 
> With my patch applied, I can bind the smbmount process to a particular
> local IP and device:
> 
> smbmount //172.2.2.2/samba /mnt/smb2 -o 
> local_dev=eth1,local_ip=172.2.2.231,username=lanforge,password=lanforge
> smbmount //172.2.2.2/samba /mnt/smb3 -o 
> local_dev=eth2,local_ip=172.2.2.232,username=lanforge,password=lanforge
> ...
> 
> As far as I can tell, the server treats each of the mounts as separate 
> entities,
> accomplishing my goal.
> 
> I would like to see this patch included in the official samba code, and 
> would
> like your feedback on any changes needed to make that happen.
> 
> 
> Thanks,
> Ben
> 


-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



More information about the samba-technical mailing list