[linux-cifs-client] [PATCH 2/6] cifs: move allocation of new
TCP_Server_Info into separate function
Christoph Hellwig
hch at infradead.org
Sun Nov 30 16:46:22 GMT 2008
On Sun, Nov 30, 2008 at 08:57:21AM -0500, Jeff Layton wrote:
> + struct TCP_Server_Info *srvTcp;
No studdly caps, please. Just call this info or srv_info.
> + if (addr->sa_family == AF_INET6) {
> + cFYI(1, ("attempting ipv6 connect"));
> + /* BB should we allow ipv6 on port 139? */
> + /* other OS never observed in Wild doing 139 with v6 */
> + memcpy(&srvTcp->addr.sockAddr6, sin_server6,
> + sizeof(struct sockaddr_in6));
> + sin_server6->sin6_port = htons(volume_info->port);
> + rc = ipv6_connect(sin_server6, &srvTcp->ssocket,
> + volume_info->noblocksnd);
> + } else {
> + memcpy(&srvTcp->addr.sockAddr, sin_server,
> + sizeof(struct sockaddr_in));
> + sin_server->sin_port = htons(volume_info->port);
> + rc = ipv4_connect(sin_server, &srvTcp->ssocket,
> + volume_info->source_rfc1001_name,
> + volume_info->target_rfc1001_name,
> + volume_info->noblocksnd,
> + volume_info->noautotune);
> + }
Any reason the declaration of sin_server and sin_Server6 aren't inside
these blocks?
More information about the linux-cifs-client
mailing list