diff options
Diffstat (limited to 'net/dccp/feat.c')
-rw-r--r-- | net/dccp/feat.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/net/dccp/feat.c b/net/dccp/feat.c index 084744e624d3..4a4f6ce4498d 100644 --- a/net/dccp/feat.c +++ b/net/dccp/feat.c | |||
@@ -4,10 +4,16 @@ | |||
4 | * An implementation of the DCCP protocol | 4 | * An implementation of the DCCP protocol |
5 | * Andrea Bittau <a.bittau@cs.ucl.ac.uk> | 5 | * Andrea Bittau <a.bittau@cs.ucl.ac.uk> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or | 7 | * ASSUMPTIONS |
8 | * modify it under the terms of the GNU General Public License | 8 | * ----------- |
9 | * as published by the Free Software Foundation; either version | 9 | * o All currently known SP features have 1-byte quantities. If in the future |
10 | * 2 of the License, or (at your option) any later version. | 10 | * extensions of RFCs 4340..42 define features with item lengths larger than |
11 | * one byte, a feature-specific extension of the code will be required. | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or | ||
14 | * modify it under the terms of the GNU General Public License | ||
15 | * as published by the Free Software Foundation; either version | ||
16 | * 2 of the License, or (at your option) any later version. | ||
11 | */ | 17 | */ |
12 | 18 | ||
13 | #include <linux/module.h> | 19 | #include <linux/module.h> |
@@ -95,7 +101,6 @@ static int dccp_feat_update_ccid(struct sock *sk, u8 type, u8 new_ccid_nr) | |||
95 | return 0; | 101 | return 0; |
96 | } | 102 | } |
97 | 103 | ||
98 | /* XXX taking only u8 vals */ | ||
99 | static int dccp_feat_update(struct sock *sk, u8 type, u8 feat, u8 val) | 104 | static int dccp_feat_update(struct sock *sk, u8 type, u8 feat, u8 val) |
100 | { | 105 | { |
101 | dccp_feat_debug(type, feat, val); | 106 | dccp_feat_debug(type, feat, val); |
@@ -140,7 +145,6 @@ static int dccp_feat_reconcile(struct sock *sk, struct dccp_opt_pend *opt, | |||
140 | /* FIXME sanity check vals */ | 145 | /* FIXME sanity check vals */ |
141 | 146 | ||
142 | /* Are values in any order? XXX Lame "algorithm" here */ | 147 | /* Are values in any order? XXX Lame "algorithm" here */ |
143 | /* XXX assume values are 1 byte */ | ||
144 | for (i = 0; i < slen; i++) { | 148 | for (i = 0; i < slen; i++) { |
145 | for (j = 0; j < rlen; j++) { | 149 | for (j = 0; j < rlen; j++) { |
146 | if (spref[i] == rpref[j]) { | 150 | if (spref[i] == rpref[j]) { |
@@ -175,7 +179,6 @@ static int dccp_feat_reconcile(struct sock *sk, struct dccp_opt_pend *opt, | |||
175 | } | 179 | } |
176 | 180 | ||
177 | /* need to put result and our preference list */ | 181 | /* need to put result and our preference list */ |
178 | /* XXX assume 1 byte vals */ | ||
179 | rlen = 1 + opt->dccpop_len; | 182 | rlen = 1 + opt->dccpop_len; |
180 | rpref = kmalloc(rlen, GFP_ATOMIC); | 183 | rpref = kmalloc(rlen, GFP_ATOMIC); |
181 | if (rpref == NULL) | 184 | if (rpref == NULL) |