PATCH: Enable binding to local IPv4 IP address for CIFS file system.
This patch provides the ability to bind to a local IP address when mounting CIFS file systems. This allows better specification of which interface a mount may use on a multi-homed machine, for instance.
The corresponding patch for mount.cifs has already been sent to the samba mailing list.
Please consider this for 2.6.19.
Signed-off-by Ben Greear <[email protected]>
fs/cifs/cifsglob.h +1 -0
@@ -118,6 +118,7 @@ struct TCP_Server_Info {struct sockaddr_in sockAddr;struct sockaddr_in6 sockAddr6; } addr; +u32 ip4_local_ip;/* if != 0, will bind locally to this IP */ wait_queue_head_t response_q;wait_queue_head_t request_q;/* if more than maxmpx to srvr must block*/ struct list_head pending_mid_q;
fs/cifs/connect.c +55 -12
154 lines not on this page · raw message
Signature · 2 lines
Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com
fs/cifs/cifsglob.h struct TCP_Server_Info { · line 121
Quoted 10 lines · Ben Greear
fs/cifs/cifsglob.h +1
-0@@ -118,6 +118,7 @@ struct TCP_Server_Info {struct sockaddr_in sockAddr;struct sockaddr_in6 sockAddr6; } addr; +u32 ip4_local_ip;/* if != 0, will bind locally to this IP */
adding a ipv4 only, no ipv6 feature like this at this age seems quite backwards. If anything you should think of easy expansion to IPv6 at least.
-Andi