Commit fe0178dc authored by Pavel Shilovsky's avatar Pavel Shilovsky

Do not overwrite sin_port during tcp_session search for 2.6.32

parent 33d3ef21
......@@ -1408,10 +1408,9 @@ cifs_find_tcp_session(struct sockaddr_storage *addr, unsigned short int port)
switch (addr->ss_family) {
case AF_INET:
addr4->sin_port = htons(port);
if ((addr4->sin_addr.s_addr !=
server->addr.sockAddr.sin_addr.s_addr) ||
(addr4->sin_port != server->addr.sockAddr.sin_port))
(htons(port) != server->addr.sockAddr.sin_port))
continue;
break;
......@@ -1421,7 +1420,7 @@ cifs_find_tcp_session(struct sockaddr_storage *addr, unsigned short int port)
&server->addr.sockAddr6.sin6_addr) ||
(addr6->sin6_scope_id !=
server->addr.sockAddr6.sin6_scope_id) ||
(addr6->sin6_port !=
(htons(port) !=
server->addr.sockAddr6.sin6_port))
continue;
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment