]> git.baikalelectronics.ru Git - kernel.git/commit
[CIFS] clean up server protocol handling
authorSteve French <sfrench@us.ibm.com>
Fri, 14 Nov 2008 03:35:10 +0000 (03:35 +0000)
committerSteve French <sfrench@us.ibm.com>
Fri, 14 Nov 2008 03:35:10 +0000 (03:35 +0000)
commit8ff3cf165f641888ab8e897b6f0bb53087afbe4f
tree5c1c7aebeee05cbd6cd02d5aebb3b0c2f8e62ddb
parentecec58724b12bb514cd261aeaa6cba9b777c19be
[CIFS] clean up server protocol handling

We're currently declaring both a sockaddr_in and sockaddr6_in on the
stack, but we really only need storage for one of them. Declare a
sockaddr struct and cast it to the proper type. Also, eliminate the
protocolType field in the TCP_Server_Info struct. It's redundant since
we have a sa_family field in the sockaddr anyway.

We may need to revisit this if SCTP is ever implemented, but for now
this will simplify the code.

CIFS over IPv6 also has a number of problems currently. This fixes all
of them that I found. Eventually, it would be nice to move more of the
code to be protocol independent, but this is a start.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/cifs_spnego.c
fs/cifs/cifsglob.h
fs/cifs/connect.c