12 #include <linux/module.h>
13 #include <linux/net.h>
15 #include <linux/errqueue.h>
16 #include <linux/udp.h>
18 #include <linux/in6.h>
19 #include <linux/icmp.h>
42 msg.msg_controllen = 0;
51 iov[0].iov_base =
hdr;
52 iov[0].iov_len =
sizeof(*hdr);
61 _leave(
" = -EAGAIN [sendmsg failed: %d]", ret);
73 static int rxrpc_accept_incoming_call(
struct rxrpc_local *local,
91 notification = alloc_skb(0,
GFP_NOFS);
134 goto invalid_service;
140 spin_lock(&call->
conn->state_lock);
141 if (sp->
hdr.securityIndex > 0 &&
142 call->
conn->state == RXRPC_CONN_SERVER_UNSECURED) {
145 call->
conn->state = RXRPC_CONN_SERVER_CHALLENGING;
151 call->
state = RXRPC_CALL_SERVER_ACCEPTING;
160 spin_lock(&call->
lock);
163 spin_unlock(&call->
lock);
167 spin_unlock(&call->
conn->state_lock);
239 _net(
"incoming call skb %p", skb);
244 memset(&srx, 0,
sizeof(srx));
259 service_id = sp->
hdr.serviceId;
267 goto invalid_service;
271 if (sk_acceptq_is_full(&rx->
sk))
273 sk_acceptq_added(&rx->
sk);
277 ret = rxrpc_accept_incoming_call(local, rx, skb, &srx);
279 sk_acceptq_removed(&rx->
sk);
285 goto process_next_packet;
287 goto invalid_service;
291 goto security_mismatch;
299 rxrpc_busy(local, &srx, &sp->
hdr);
301 goto process_next_packet;
306 goto process_next_packet;
312 goto process_next_packet;
326 _enter(
",%lx", user_call_ID);
338 pp = &rx->
calls.rb_node;
344 if (user_call_ID < call->user_call_ID)
355 sk_acceptq_removed(&rx->
sk);
358 switch (call->
state) {
359 case RXRPC_CALL_SERVER_ACCEPTING:
360 call->
state = RXRPC_CALL_SERVER_RECV_REQUEST;
362 case RXRPC_CALL_REMOTELY_ABORTED:
363 case RXRPC_CALL_LOCALLY_ABORTED:
366 case RXRPC_CALL_NETWORK_ERROR:
367 ret = call->
conn->error;
369 case RXRPC_CALL_DEAD:
378 rb_link_node(&call->
sock_node, parent, pp);
396 _debug(
"release %p", call);
402 _debug(
"discard %p", call);
431 sk_acceptq_removed(&rx->
sk);
434 switch (call->
state) {
446 ret = call->
conn->error;
459 _debug(
"release %p", call);
465 _debug(
"discard %p", call);
485 _enter(
",%lx", user_call_ID);