| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * net/dccp/options.c |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 5 | 6 | * Copyright (c) 2005 Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org> |
|---|
| 6 | 7 | * Copyright (c) 2005 Arnaldo Carvalho de Melo <acme@ghostprotocols.net> |
|---|
| 7 | 8 | * Copyright (c) 2005 Ian McDonald <ian.mcdonald@jandi.co.nz> |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is free software; you can redistribute it and/or |
|---|
| 10 | | - * modify it under the terms of the GNU General Public License |
|---|
| 11 | | - * as published by the Free Software Foundation; either version |
|---|
| 12 | | - * 2 of the License, or (at your option) any later version. |
|---|
| 13 | 9 | */ |
|---|
| 14 | 10 | #include <linux/dccp.h> |
|---|
| 15 | 11 | #include <linux/module.h> |
|---|
| .. | .. |
|---|
| 47 | 43 | * dccp_parse_options - Parse DCCP options present in @skb |
|---|
| 48 | 44 | * @sk: client|server|listening dccp socket (when @dreq != NULL) |
|---|
| 49 | 45 | * @dreq: request socket to use during connection setup, or NULL |
|---|
| 46 | + * @skb: frame to parse |
|---|
| 50 | 47 | */ |
|---|
| 51 | 48 | int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq, |
|---|
| 52 | 49 | struct sk_buff *skb) |
|---|
| .. | .. |
|---|
| 60 | 57 | (dh->dccph_doff * 4); |
|---|
| 61 | 58 | struct dccp_options_received *opt_recv = &dp->dccps_options_received; |
|---|
| 62 | 59 | unsigned char opt, len; |
|---|
| 63 | | - unsigned char *uninitialized_var(value); |
|---|
| 60 | + unsigned char *value; |
|---|
| 64 | 61 | u32 elapsed_time; |
|---|
| 65 | 62 | __be32 opt_val; |
|---|
| 66 | 63 | int rc; |
|---|
| .. | .. |
|---|
| 228 | 225 | * interested. The RX CCID need not parse Ack Vectors, |
|---|
| 229 | 226 | * since it is only interested in clearing old state. |
|---|
| 230 | 227 | */ |
|---|
| 231 | | - /* fall through */ |
|---|
| 228 | + fallthrough; |
|---|
| 232 | 229 | case DCCPO_MIN_TX_CCID_SPECIFIC ... DCCPO_MAX_TX_CCID_SPECIFIC: |
|---|
| 233 | 230 | if (ccid_hc_tx_parse_options(dp->dccps_hc_tx_ccid, sk, |
|---|
| 234 | 231 | pkt_type, opt, value, len)) |
|---|
| .. | .. |
|---|
| 475 | 472 | |
|---|
| 476 | 473 | /** |
|---|
| 477 | 474 | * dccp_insert_option_mandatory - Mandatory option (5.8.2) |
|---|
| 475 | + * @skb: frame into which to insert option |
|---|
| 476 | + * |
|---|
| 478 | 477 | * Note that since we are using skb_push, this function needs to be called |
|---|
| 479 | 478 | * _after_ inserting the option it is supposed to influence (stack order). |
|---|
| 480 | 479 | */ |
|---|
| .. | .. |
|---|
| 490 | 489 | |
|---|
| 491 | 490 | /** |
|---|
| 492 | 491 | * dccp_insert_fn_opt - Insert single Feature-Negotiation option into @skb |
|---|
| 492 | + * @skb: frame to insert feature negotiation option into |
|---|
| 493 | 493 | * @type: %DCCPO_CHANGE_L, %DCCPO_CHANGE_R, %DCCPO_CONFIRM_L, %DCCPO_CONFIRM_R |
|---|
| 494 | 494 | * @feat: one out of %dccp_feature_numbers |
|---|
| 495 | 495 | * @val: NN value or SP array (preferred element first) to copy |
|---|