提交 3388007b 编写于 作者: A Allan Stephens 提交者: David S. Miller

[TIPC]: Implied connect now saves dest name for retrieval as ancillary data.

Signed-off-by: NAllan Stephens <allan.stephens@windriver.com>
Signed-off-by: NPer Liden <per.liden@ericsson.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6b384de8
...@@ -470,6 +470,10 @@ static int send_msg(struct kiocb *iocb, struct socket *sock, ...@@ -470,6 +470,10 @@ static int send_msg(struct kiocb *iocb, struct socket *sock,
if ((tsock->p->published) || if ((tsock->p->published) ||
((sock->type == SOCK_STREAM) && (total_len != 0))) ((sock->type == SOCK_STREAM) && (total_len != 0)))
return -EOPNOTSUPP; return -EOPNOTSUPP;
if (dest->addrtype == TIPC_ADDR_NAME) {
tsock->p->conn_type = dest->addr.name.name.type;
tsock->p->conn_instance = dest->addr.name.name.instance;
}
} }
if (down_interruptible(&tsock->sem)) if (down_interruptible(&tsock->sem))
...@@ -1269,10 +1273,6 @@ static int connect(struct socket *sock, struct sockaddr *dest, int destlen, ...@@ -1269,10 +1273,6 @@ static int connect(struct socket *sock, struct sockaddr *dest, int destlen,
msg = buf_msg(buf); msg = buf_msg(buf);
res = auto_connect(sock, tsock, msg); res = auto_connect(sock, tsock, msg);
if (!res) { if (!res) {
if (dst->addrtype == TIPC_ADDR_NAME) {
tsock->p->conn_type = dst->addr.name.name.type;
tsock->p->conn_instance = dst->addr.name.name.instance;
}
if (!msg_data_sz(msg)) if (!msg_data_sz(msg))
advance_queue(tsock); advance_queue(tsock);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册