aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/socket.c')
-rw-r--r--net/tipc/socket.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index c543ae6cbf65..0546556d3517 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -65,7 +65,6 @@
65 * @max_pkt: maximum packet size "hint" used when building messages sent by port 65 * @max_pkt: maximum packet size "hint" used when building messages sent by port
66 * @portid: unique port identity in TIPC socket hash table 66 * @portid: unique port identity in TIPC socket hash table
67 * @phdr: preformatted message header used when sending messages 67 * @phdr: preformatted message header used when sending messages
68 * @port_list: adjacent ports in TIPC's global list of ports
69 * @publications: list of publications for port 68 * @publications: list of publications for port
70 * @pub_count: total # of publications port has made during its lifetime 69 * @pub_count: total # of publications port has made during its lifetime
71 * @probing_state: 70 * @probing_state:
@@ -75,7 +74,7 @@
75 * @link_cong: non-zero if owner must sleep because of link congestion 74 * @link_cong: non-zero if owner must sleep because of link congestion
76 * @sent_unacked: # messages sent by socket, and not yet acked by peer 75 * @sent_unacked: # messages sent by socket, and not yet acked by peer
77 * @rcv_unacked: # messages read by user, but not yet acked back to peer 76 * @rcv_unacked: # messages read by user, but not yet acked back to peer
78 * @remote: 'connected' peer for dgram/rdm 77 * @peer: 'connected' peer for dgram/rdm
79 * @node: hash table node 78 * @node: hash table node
80 * @rcu: rcu struct for tipc_sock 79 * @rcu: rcu struct for tipc_sock
81 */ 80 */
@@ -101,7 +100,7 @@ struct tipc_sock {
101 u16 peer_caps; 100 u16 peer_caps;
102 u16 rcv_unacked; 101 u16 rcv_unacked;
103 u16 rcv_win; 102 u16 rcv_win;
104 struct sockaddr_tipc remote; 103 struct sockaddr_tipc peer;
105 struct rhash_head node; 104 struct rhash_head node;
106 struct rcu_head rcu; 105 struct rcu_head rcu;
107}; 106};
@@ -904,7 +903,7 @@ static int __tipc_sendmsg(struct socket *sock, struct msghdr *m, size_t dsz)
904 return -EMSGSIZE; 903 return -EMSGSIZE;
905 if (unlikely(!dest)) { 904 if (unlikely(!dest)) {
906 if (tsk->connected && sock->state == SS_READY) 905 if (tsk->connected && sock->state == SS_READY)
907 dest = &tsk->remote; 906 dest = &tsk->peer;
908 else 907 else
909 return -EDESTADDRREQ; 908 return -EDESTADDRREQ;
910 } else if (unlikely(m->msg_namelen < sizeof(*dest)) || 909 } else if (unlikely(m->msg_namelen < sizeof(*dest)) ||
@@ -1939,12 +1938,12 @@ static int tipc_connect(struct socket *sock, struct sockaddr *dest,
1939 /* DGRAM/RDM connect(), just save the destaddr */ 1938 /* DGRAM/RDM connect(), just save the destaddr */
1940 if (sock->state == SS_READY) { 1939 if (sock->state == SS_READY) {
1941 if (dst->family == AF_UNSPEC) { 1940 if (dst->family == AF_UNSPEC) {
1942 memset(&tsk->remote, 0, sizeof(struct sockaddr_tipc)); 1941 memset(&tsk->peer, 0, sizeof(struct sockaddr_tipc));
1943 tsk->connected = 0; 1942 tsk->connected = 0;
1944 } else if (destlen != sizeof(struct sockaddr_tipc)) { 1943 } else if (destlen != sizeof(struct sockaddr_tipc)) {
1945 res = -EINVAL; 1944 res = -EINVAL;
1946 } else { 1945 } else {
1947 memcpy(&tsk->remote, dest, destlen); 1946 memcpy(&tsk->peer, dest, destlen);
1948 tsk->connected = 1; 1947 tsk->connected = 1;
1949 } 1948 }
1950 goto exit; 1949 goto exit;