David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 1 | /* connection-level event handling |
| 2 | * |
| 3 | * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. |
| 4 | * Written by David Howells (dhowells@redhat.com) |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License |
| 8 | * as published by the Free Software Foundation; either version |
| 9 | * 2 of the License, or (at your option) any later version. |
| 10 | */ |
| 11 | |
Joe Perches | 9b6d539 | 2016-06-02 12:08:52 -0700 | [diff] [blame] | 12 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
| 13 | |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 14 | #include <linux/module.h> |
| 15 | #include <linux/net.h> |
| 16 | #include <linux/skbuff.h> |
| 17 | #include <linux/errqueue.h> |
| 18 | #include <linux/udp.h> |
| 19 | #include <linux/in.h> |
| 20 | #include <linux/in6.h> |
| 21 | #include <linux/icmp.h> |
| 22 | #include <net/sock.h> |
| 23 | #include <net/af_rxrpc.h> |
| 24 | #include <net/ip.h> |
| 25 | #include "ar-internal.h" |
| 26 | |
| 27 | /* |
| 28 | * pass a connection-level abort onto all calls on that connection |
| 29 | */ |
| 30 | static void rxrpc_abort_calls(struct rxrpc_connection *conn, int state, |
| 31 | u32 abort_code) |
| 32 | { |
| 33 | struct rxrpc_call *call; |
| 34 | struct rb_node *p; |
| 35 | |
| 36 | _enter("{%d},%x", conn->debug_id, abort_code); |
| 37 | |
| 38 | read_lock_bh(&conn->lock); |
| 39 | |
| 40 | for (p = rb_first(&conn->calls); p; p = rb_next(p)) { |
| 41 | call = rb_entry(p, struct rxrpc_call, conn_node); |
| 42 | write_lock(&call->state_lock); |
| 43 | if (call->state <= RXRPC_CALL_COMPLETE) { |
| 44 | call->state = state; |
David Howells | dc44b3a | 2016-04-07 17:23:30 +0100 | [diff] [blame] | 45 | if (state == RXRPC_CALL_LOCALLY_ABORTED) { |
| 46 | call->local_abort = conn->local_abort; |
David Howells | 4c198ad | 2016-03-04 15:53:46 +0000 | [diff] [blame] | 47 | set_bit(RXRPC_CALL_EV_CONN_ABORT, &call->events); |
David Howells | dc44b3a | 2016-04-07 17:23:30 +0100 | [diff] [blame] | 48 | } else { |
| 49 | call->remote_abort = conn->remote_abort; |
David Howells | 4c198ad | 2016-03-04 15:53:46 +0000 | [diff] [blame] | 50 | set_bit(RXRPC_CALL_EV_RCVD_ABORT, &call->events); |
David Howells | dc44b3a | 2016-04-07 17:23:30 +0100 | [diff] [blame] | 51 | } |
David Howells | 651350d | 2007-04-26 15:50:17 -0700 | [diff] [blame] | 52 | rxrpc_queue_call(call); |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 53 | } |
| 54 | write_unlock(&call->state_lock); |
| 55 | } |
| 56 | |
| 57 | read_unlock_bh(&conn->lock); |
| 58 | _leave(""); |
| 59 | } |
| 60 | |
| 61 | /* |
| 62 | * generate a connection-level abort |
| 63 | */ |
| 64 | static int rxrpc_abort_connection(struct rxrpc_connection *conn, |
| 65 | u32 error, u32 abort_code) |
| 66 | { |
David Howells | 0d12f8a | 2016-03-04 15:53:46 +0000 | [diff] [blame] | 67 | struct rxrpc_wire_header whdr; |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 68 | struct msghdr msg; |
| 69 | struct kvec iov[2]; |
| 70 | __be32 word; |
| 71 | size_t len; |
David Howells | 0d12f8a | 2016-03-04 15:53:46 +0000 | [diff] [blame] | 72 | u32 serial; |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 73 | int ret; |
| 74 | |
| 75 | _enter("%d,,%u,%u", conn->debug_id, error, abort_code); |
| 76 | |
| 77 | /* generate a connection-level abort */ |
| 78 | spin_lock_bh(&conn->state_lock); |
| 79 | if (conn->state < RXRPC_CONN_REMOTELY_ABORTED) { |
| 80 | conn->state = RXRPC_CONN_LOCALLY_ABORTED; |
| 81 | conn->error = error; |
| 82 | spin_unlock_bh(&conn->state_lock); |
| 83 | } else { |
| 84 | spin_unlock_bh(&conn->state_lock); |
| 85 | _leave(" = 0 [already dead]"); |
| 86 | return 0; |
| 87 | } |
| 88 | |
| 89 | rxrpc_abort_calls(conn, RXRPC_CALL_LOCALLY_ABORTED, abort_code); |
| 90 | |
David Howells | 85f3227 | 2016-04-04 14:00:36 +0100 | [diff] [blame] | 91 | msg.msg_name = &conn->params.peer->srx.transport; |
| 92 | msg.msg_namelen = conn->params.peer->srx.transport_len; |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 93 | msg.msg_control = NULL; |
| 94 | msg.msg_controllen = 0; |
| 95 | msg.msg_flags = 0; |
| 96 | |
David Howells | 19ffa01 | 2016-04-04 14:00:36 +0100 | [diff] [blame] | 97 | whdr.epoch = htonl(conn->proto.epoch); |
| 98 | whdr.cid = htonl(conn->proto.cid); |
David Howells | 0d12f8a | 2016-03-04 15:53:46 +0000 | [diff] [blame] | 99 | whdr.callNumber = 0; |
| 100 | whdr.seq = 0; |
| 101 | whdr.type = RXRPC_PACKET_TYPE_ABORT; |
| 102 | whdr.flags = conn->out_clientflag; |
| 103 | whdr.userStatus = 0; |
| 104 | whdr.securityIndex = conn->security_ix; |
| 105 | whdr._rsvd = 0; |
David Howells | 19ffa01 | 2016-04-04 14:00:36 +0100 | [diff] [blame] | 106 | whdr.serviceId = htons(conn->params.service_id); |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 107 | |
David Howells | dc44b3a | 2016-04-07 17:23:30 +0100 | [diff] [blame] | 108 | word = htonl(conn->local_abort); |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 109 | |
David Howells | 0d12f8a | 2016-03-04 15:53:46 +0000 | [diff] [blame] | 110 | iov[0].iov_base = &whdr; |
| 111 | iov[0].iov_len = sizeof(whdr); |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 112 | iov[1].iov_base = &word; |
| 113 | iov[1].iov_len = sizeof(word); |
| 114 | |
| 115 | len = iov[0].iov_len + iov[1].iov_len; |
| 116 | |
David Howells | 0d12f8a | 2016-03-04 15:53:46 +0000 | [diff] [blame] | 117 | serial = atomic_inc_return(&conn->serial); |
| 118 | whdr.serial = htonl(serial); |
David Howells | dc44b3a | 2016-04-07 17:23:30 +0100 | [diff] [blame] | 119 | _proto("Tx CONN ABORT %%%u { %d }", serial, conn->local_abort); |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 120 | |
David Howells | 85f3227 | 2016-04-04 14:00:36 +0100 | [diff] [blame] | 121 | ret = kernel_sendmsg(conn->params.local->socket, &msg, iov, 2, len); |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 122 | if (ret < 0) { |
| 123 | _debug("sendmsg failed: %d", ret); |
| 124 | return -EAGAIN; |
| 125 | } |
| 126 | |
| 127 | _leave(" = 0"); |
| 128 | return 0; |
| 129 | } |
| 130 | |
| 131 | /* |
| 132 | * mark a call as being on a now-secured channel |
| 133 | * - must be called with softirqs disabled |
| 134 | */ |
Roel Kluin | 5eaa65b | 2008-12-10 15:18:31 -0800 | [diff] [blame] | 135 | static void rxrpc_call_is_secure(struct rxrpc_call *call) |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 136 | { |
| 137 | _enter("%p", call); |
| 138 | if (call) { |
| 139 | read_lock(&call->state_lock); |
| 140 | if (call->state < RXRPC_CALL_COMPLETE && |
David Howells | 4c198ad | 2016-03-04 15:53:46 +0000 | [diff] [blame] | 141 | !test_and_set_bit(RXRPC_CALL_EV_SECURED, &call->events)) |
David Howells | 651350d | 2007-04-26 15:50:17 -0700 | [diff] [blame] | 142 | rxrpc_queue_call(call); |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 143 | read_unlock(&call->state_lock); |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | /* |
| 148 | * connection-level Rx packet processor |
| 149 | */ |
| 150 | static int rxrpc_process_event(struct rxrpc_connection *conn, |
| 151 | struct sk_buff *skb, |
| 152 | u32 *_abort_code) |
| 153 | { |
| 154 | struct rxrpc_skb_priv *sp = rxrpc_skb(skb); |
David Howells | 0d12f8a | 2016-03-04 15:53:46 +0000 | [diff] [blame] | 155 | __be32 wtmp; |
| 156 | u32 abort_code; |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 157 | int loop, ret; |
| 158 | |
David Howells | 519d256 | 2009-06-16 21:36:44 +0100 | [diff] [blame] | 159 | if (conn->state >= RXRPC_CONN_REMOTELY_ABORTED) { |
| 160 | kleave(" = -ECONNABORTED [%u]", conn->state); |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 161 | return -ECONNABORTED; |
David Howells | 519d256 | 2009-06-16 21:36:44 +0100 | [diff] [blame] | 162 | } |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 163 | |
David Howells | 0d12f8a | 2016-03-04 15:53:46 +0000 | [diff] [blame] | 164 | _enter("{%d},{%u,%%%u},", conn->debug_id, sp->hdr.type, sp->hdr.serial); |
David Howells | 519d256 | 2009-06-16 21:36:44 +0100 | [diff] [blame] | 165 | |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 166 | switch (sp->hdr.type) { |
| 167 | case RXRPC_PACKET_TYPE_ABORT: |
David Howells | 0d12f8a | 2016-03-04 15:53:46 +0000 | [diff] [blame] | 168 | if (skb_copy_bits(skb, 0, &wtmp, sizeof(wtmp)) < 0) |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 169 | return -EPROTO; |
David Howells | 0d12f8a | 2016-03-04 15:53:46 +0000 | [diff] [blame] | 170 | abort_code = ntohl(wtmp); |
| 171 | _proto("Rx ABORT %%%u { ac=%d }", sp->hdr.serial, abort_code); |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 172 | |
| 173 | conn->state = RXRPC_CONN_REMOTELY_ABORTED; |
| 174 | rxrpc_abort_calls(conn, RXRPC_CALL_REMOTELY_ABORTED, |
David Howells | 0d12f8a | 2016-03-04 15:53:46 +0000 | [diff] [blame] | 175 | abort_code); |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 176 | return -ECONNABORTED; |
| 177 | |
| 178 | case RXRPC_PACKET_TYPE_CHALLENGE: |
David Howells | e0e4d82 | 2016-04-07 17:23:58 +0100 | [diff] [blame] | 179 | return conn->security->respond_to_challenge(conn, skb, |
| 180 | _abort_code); |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 181 | |
| 182 | case RXRPC_PACKET_TYPE_RESPONSE: |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 183 | ret = conn->security->verify_response(conn, skb, _abort_code); |
| 184 | if (ret < 0) |
| 185 | return ret; |
| 186 | |
| 187 | ret = conn->security->init_connection_security(conn); |
| 188 | if (ret < 0) |
| 189 | return ret; |
| 190 | |
Herbert Xu | a263629 | 2016-06-26 14:55:24 -0700 | [diff] [blame] | 191 | ret = conn->security->prime_packet_security(conn); |
| 192 | if (ret < 0) |
| 193 | return ret; |
| 194 | |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 195 | read_lock_bh(&conn->lock); |
| 196 | spin_lock(&conn->state_lock); |
| 197 | |
David Howells | bba304d | 2016-06-27 10:32:02 +0100 | [diff] [blame] | 198 | if (conn->state == RXRPC_CONN_SERVICE_CHALLENGING) { |
| 199 | conn->state = RXRPC_CONN_SERVICE; |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 200 | for (loop = 0; loop < RXRPC_MAXCALLS; loop++) |
| 201 | rxrpc_call_is_secure(conn->channels[loop]); |
| 202 | } |
| 203 | |
| 204 | spin_unlock(&conn->state_lock); |
| 205 | read_unlock_bh(&conn->lock); |
| 206 | return 0; |
| 207 | |
| 208 | default: |
David Howells | 519d256 | 2009-06-16 21:36:44 +0100 | [diff] [blame] | 209 | _leave(" = -EPROTO [%u]", sp->hdr.type); |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 210 | return -EPROTO; |
| 211 | } |
| 212 | } |
| 213 | |
| 214 | /* |
| 215 | * set up security and issue a challenge |
| 216 | */ |
| 217 | static void rxrpc_secure_connection(struct rxrpc_connection *conn) |
| 218 | { |
| 219 | u32 abort_code; |
| 220 | int ret; |
| 221 | |
| 222 | _enter("{%d}", conn->debug_id); |
| 223 | |
| 224 | ASSERT(conn->security_ix != 0); |
| 225 | |
David Howells | 19ffa01 | 2016-04-04 14:00:36 +0100 | [diff] [blame] | 226 | if (!conn->params.key) { |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 227 | _debug("set up security"); |
| 228 | ret = rxrpc_init_server_conn_security(conn); |
| 229 | switch (ret) { |
| 230 | case 0: |
| 231 | break; |
| 232 | case -ENOENT: |
| 233 | abort_code = RX_CALL_DEAD; |
| 234 | goto abort; |
| 235 | default: |
| 236 | abort_code = RXKADNOAUTH; |
| 237 | goto abort; |
| 238 | } |
| 239 | } |
| 240 | |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 241 | if (conn->security->issue_challenge(conn) < 0) { |
| 242 | abort_code = RX_CALL_DEAD; |
| 243 | ret = -ENOMEM; |
| 244 | goto abort; |
| 245 | } |
| 246 | |
| 247 | _leave(""); |
| 248 | return; |
| 249 | |
| 250 | abort: |
| 251 | _debug("abort %d, %d", ret, abort_code); |
| 252 | rxrpc_abort_connection(conn, -ret, abort_code); |
| 253 | _leave(" [aborted]"); |
| 254 | } |
| 255 | |
| 256 | /* |
| 257 | * connection-level event processor |
| 258 | */ |
| 259 | void rxrpc_process_connection(struct work_struct *work) |
| 260 | { |
| 261 | struct rxrpc_connection *conn = |
| 262 | container_of(work, struct rxrpc_connection, processor); |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 263 | struct sk_buff *skb; |
| 264 | u32 abort_code = RX_PROTOCOL_ERROR; |
| 265 | int ret; |
| 266 | |
| 267 | _enter("{%d}", conn->debug_id); |
| 268 | |
David Howells | 2c4579e | 2016-06-27 10:32:03 +0100 | [diff] [blame^] | 269 | if (test_and_clear_bit(RXRPC_CONN_EV_CHALLENGE, &conn->events)) |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 270 | rxrpc_secure_connection(conn); |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 271 | |
| 272 | /* go through the conn-level event packets, releasing the ref on this |
| 273 | * connection that each one has when we've finished with it */ |
| 274 | while ((skb = skb_dequeue(&conn->rx_queue))) { |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 275 | ret = rxrpc_process_event(conn, skb, &abort_code); |
| 276 | switch (ret) { |
| 277 | case -EPROTO: |
| 278 | case -EKEYEXPIRED: |
| 279 | case -EKEYREJECTED: |
| 280 | goto protocol_error; |
| 281 | case -EAGAIN: |
| 282 | goto requeue_and_leave; |
| 283 | case -ECONNABORTED: |
| 284 | default: |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 285 | rxrpc_free_skb(skb); |
| 286 | break; |
| 287 | } |
| 288 | } |
| 289 | |
| 290 | out: |
| 291 | rxrpc_put_connection(conn); |
| 292 | _leave(""); |
| 293 | return; |
| 294 | |
| 295 | requeue_and_leave: |
| 296 | skb_queue_head(&conn->rx_queue, skb); |
| 297 | goto out; |
| 298 | |
| 299 | protocol_error: |
| 300 | if (rxrpc_abort_connection(conn, -ret, abort_code) < 0) |
| 301 | goto requeue_and_leave; |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 302 | rxrpc_free_skb(skb); |
| 303 | _leave(" [EPROTO]"); |
| 304 | goto out; |
| 305 | } |
| 306 | |
| 307 | /* |
David Howells | 651350d | 2007-04-26 15:50:17 -0700 | [diff] [blame] | 308 | * put a packet up for transport-level abort |
| 309 | */ |
| 310 | void rxrpc_reject_packet(struct rxrpc_local *local, struct sk_buff *skb) |
| 311 | { |
| 312 | CHECK_SLAB_OKAY(&local->usage); |
| 313 | |
David Howells | 651350d | 2007-04-26 15:50:17 -0700 | [diff] [blame] | 314 | skb_queue_tail(&local->reject_queue, skb); |
David Howells | 5acbee4 | 2016-06-27 10:32:02 +0100 | [diff] [blame] | 315 | rxrpc_queue_local(local); |
David Howells | 651350d | 2007-04-26 15:50:17 -0700 | [diff] [blame] | 316 | } |
| 317 | |
| 318 | /* |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 319 | * reject packets through the local endpoint |
| 320 | */ |
David Howells | 4f95dd7 | 2016-04-04 14:00:35 +0100 | [diff] [blame] | 321 | void rxrpc_reject_packets(struct rxrpc_local *local) |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 322 | { |
| 323 | union { |
| 324 | struct sockaddr sa; |
| 325 | struct sockaddr_in sin; |
| 326 | } sa; |
| 327 | struct rxrpc_skb_priv *sp; |
David Howells | 0d12f8a | 2016-03-04 15:53:46 +0000 | [diff] [blame] | 328 | struct rxrpc_wire_header whdr; |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 329 | struct sk_buff *skb; |
| 330 | struct msghdr msg; |
| 331 | struct kvec iov[2]; |
| 332 | size_t size; |
| 333 | __be32 code; |
| 334 | |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 335 | _enter("%d", local->debug_id); |
| 336 | |
David Howells | 0d12f8a | 2016-03-04 15:53:46 +0000 | [diff] [blame] | 337 | iov[0].iov_base = &whdr; |
| 338 | iov[0].iov_len = sizeof(whdr); |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 339 | iov[1].iov_base = &code; |
| 340 | iov[1].iov_len = sizeof(code); |
David Howells | 0d12f8a | 2016-03-04 15:53:46 +0000 | [diff] [blame] | 341 | size = sizeof(whdr) + sizeof(code); |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 342 | |
| 343 | msg.msg_name = &sa; |
| 344 | msg.msg_control = NULL; |
| 345 | msg.msg_controllen = 0; |
| 346 | msg.msg_flags = 0; |
| 347 | |
| 348 | memset(&sa, 0, sizeof(sa)); |
| 349 | sa.sa.sa_family = local->srx.transport.family; |
| 350 | switch (sa.sa.sa_family) { |
| 351 | case AF_INET: |
| 352 | msg.msg_namelen = sizeof(sa.sin); |
| 353 | break; |
| 354 | default: |
| 355 | msg.msg_namelen = 0; |
| 356 | break; |
| 357 | } |
| 358 | |
David Howells | 0d12f8a | 2016-03-04 15:53:46 +0000 | [diff] [blame] | 359 | memset(&whdr, 0, sizeof(whdr)); |
| 360 | whdr.type = RXRPC_PACKET_TYPE_ABORT; |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 361 | |
| 362 | while ((skb = skb_dequeue(&local->reject_queue))) { |
| 363 | sp = rxrpc_skb(skb); |
| 364 | switch (sa.sa.sa_family) { |
| 365 | case AF_INET: |
| 366 | sa.sin.sin_port = udp_hdr(skb)->source; |
| 367 | sa.sin.sin_addr.s_addr = ip_hdr(skb)->saddr; |
| 368 | code = htonl(skb->priority); |
| 369 | |
David Howells | 0d12f8a | 2016-03-04 15:53:46 +0000 | [diff] [blame] | 370 | whdr.epoch = htonl(sp->hdr.epoch); |
| 371 | whdr.cid = htonl(sp->hdr.cid); |
| 372 | whdr.callNumber = htonl(sp->hdr.callNumber); |
| 373 | whdr.serviceId = htons(sp->hdr.serviceId); |
| 374 | whdr.flags = sp->hdr.flags; |
| 375 | whdr.flags ^= RXRPC_CLIENT_INITIATED; |
| 376 | whdr.flags &= RXRPC_CLIENT_INITIATED; |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 377 | |
| 378 | kernel_sendmsg(local->socket, &msg, iov, 2, size); |
| 379 | break; |
| 380 | |
| 381 | default: |
| 382 | break; |
| 383 | } |
| 384 | |
| 385 | rxrpc_free_skb(skb); |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 386 | } |
| 387 | |
David Howells | 17926a7 | 2007-04-26 15:48:28 -0700 | [diff] [blame] | 388 | _leave(""); |
| 389 | } |