Commit 1c220b69 authored by David Howells's avatar David Howells

rxrpc: The RXRPC_ACCEPT control message should not have an address

When sendmsg() is called with the RXRPC_ACCEPT control message, sendmsg()
shouldn't also be given an address in msg_name.
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
parent dbdaa124
......@@ -199,7 +199,8 @@ int rxrpc_do_sendmsg(struct rxrpc_sock *rx, struct msghdr *msg, size_t len)
return ret;
if (cmd == RXRPC_CMD_ACCEPT) {
if (rx->sk.sk_state != RXRPC_SERVER_LISTENING)
if (rx->sk.sk_state != RXRPC_SERVER_LISTENING ||
msg->msg_name)
return -EINVAL;
call = rxrpc_accept_call(rx, user_call_ID);
if (IS_ERR(call))
......
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