From 66cd132aefe6a08cc5fe49b15df0b36b61934c86 Mon Sep 17 00:00:00 2001 From: Gerrit Renker Date: Thu, 4 Sep 2008 07:30:19 +0200 Subject: [PATCH] --- yaml --- r: 111503 b: refs/heads/master c: f10ecaee6dc2c6d56783462b2a82e98bc81b55f4 h: refs/heads/master i: 111501: c2051ec9a2b0d2adce4a794e557108ae30d8776d 111499: 111c05f8def2e3ce5516db6e07f34cf37396378b 111495: c3b15916365fbec5bd902f4e128e5cfdcd52a613 111487: 3f1f27b53efa4d22f9be66c52c4dc32e69ecf540 v: v3 --- [refs] | 2 +- trunk/include/linux/dccp.h | 6 ++++-- trunk/net/dccp/options.c | 13 +++---------- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/[refs] b/[refs] index 57a87b600110..bc476be28542 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ce177ae2e6b196659e93a9408cc1f5f13f206d13 +refs/heads/master: f10ecaee6dc2c6d56783462b2a82e98bc81b55f4 diff --git a/trunk/include/linux/dccp.h b/trunk/include/linux/dccp.h index 7434a8353e23..7187bd8a75f6 100644 --- a/trunk/include/linux/dccp.h +++ b/trunk/include/linux/dccp.h @@ -165,8 +165,10 @@ enum { DCCPO_TIMESTAMP_ECHO = 42, DCCPO_ELAPSED_TIME = 43, DCCPO_MAX = 45, - DCCPO_MIN_CCID_SPECIFIC = 128, - DCCPO_MAX_CCID_SPECIFIC = 255, + DCCPO_MIN_RX_CCID_SPECIFIC = 128, /* from sender to receiver */ + DCCPO_MAX_RX_CCID_SPECIFIC = 191, + DCCPO_MIN_TX_CCID_SPECIFIC = 192, /* from receiver to sender */ + DCCPO_MAX_TX_CCID_SPECIFIC = 255, }; /* maximum size of a single TLV-encoded DCCP option (sans type/len bytes) */ #define DCCP_SINGLE_OPT_MAXLEN 253 diff --git a/trunk/net/dccp/options.c b/trunk/net/dccp/options.c index b102774694c6..e1c94e2b8be0 100644 --- a/trunk/net/dccp/options.c +++ b/trunk/net/dccp/options.c @@ -96,18 +96,11 @@ int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq, } /* - * CCID-Specific Options (from RFC 4340, sec. 10.3): - * - * Option numbers 128 through 191 are for options sent from the - * HC-Sender to the HC-Receiver; option numbers 192 through 255 - * are for options sent from the HC-Receiver to the HC-Sender. - * * CCID-specific options are ignored during connection setup, as * negotiation may still be in progress (see RFC 4340, 10.3). * The same applies to Ack Vectors, as these depend on the CCID. - * */ - if (dreq != NULL && (opt >= 128 || + if (dreq != NULL && (opt >= DCCPO_MIN_RX_CCID_SPECIFIC || opt == DCCPO_ACK_VECTOR_0 || opt == DCCPO_ACK_VECTOR_1)) goto ignore_option; @@ -226,12 +219,12 @@ int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq, dccp_pr_debug("%s rx opt: ELAPSED_TIME=%d\n", dccp_role(sk), elapsed_time); break; - case 128 ... 191: + case DCCPO_MIN_RX_CCID_SPECIFIC ... DCCPO_MAX_RX_CCID_SPECIFIC: if (ccid_hc_rx_parse_options(dp->dccps_hc_rx_ccid, sk, pkt_type, opt, value, len)) goto out_invalid_option; break; - case 192 ... 255: + case DCCPO_MIN_TX_CCID_SPECIFIC ... DCCPO_MAX_TX_CCID_SPECIFIC: if (ccid_hc_tx_parse_options(dp->dccps_hc_tx_ccid, sk, pkt_type, opt, value, len)) goto out_invalid_option;