feat.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643
  1. /*
  2. * net/dccp/feat.c
  3. *
  4. * An implementation of the DCCP protocol
  5. * Andrea Bittau <a.bittau@cs.ucl.ac.uk>
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License
  9. * as published by the Free Software Foundation; either version
  10. * 2 of the License, or (at your option) any later version.
  11. */
  12. #include <linux/module.h>
  13. #include "ccid.h"
  14. #include "feat.h"
  15. #define DCCP_FEAT_SP_NOAGREE (-123)
  16. int dccp_feat_change(struct dccp_minisock *dmsk, u8 type, u8 feature,
  17. u8 *val, u8 len, gfp_t gfp)
  18. {
  19. struct dccp_opt_pend *opt;
  20. dccp_feat_debug(type, feature, *val);
  21. if (!dccp_feat_is_valid_type(type)) {
  22. pr_info("option type %d invalid in negotiation\n", type);
  23. return 1;
  24. }
  25. if (!dccp_feat_is_valid_length(type, feature, len)) {
  26. pr_info("invalid length %d\n", len);
  27. return 1;
  28. }
  29. /* XXX add further sanity checks */
  30. /* check if that feature is already being negotiated */
  31. list_for_each_entry(opt, &dmsk->dccpms_pending, dccpop_node) {
  32. /* ok we found a negotiation for this option already */
  33. if (opt->dccpop_feat == feature && opt->dccpop_type == type) {
  34. dccp_pr_debug("Replacing old\n");
  35. /* replace */
  36. BUG_ON(opt->dccpop_val == NULL);
  37. kfree(opt->dccpop_val);
  38. opt->dccpop_val = val;
  39. opt->dccpop_len = len;
  40. opt->dccpop_conf = 0;
  41. return 0;
  42. }
  43. }
  44. /* negotiation for a new feature */
  45. opt = kmalloc(sizeof(*opt), gfp);
  46. if (opt == NULL)
  47. return -ENOMEM;
  48. opt->dccpop_type = type;
  49. opt->dccpop_feat = feature;
  50. opt->dccpop_len = len;
  51. opt->dccpop_val = val;
  52. opt->dccpop_conf = 0;
  53. opt->dccpop_sc = NULL;
  54. BUG_ON(opt->dccpop_val == NULL);
  55. list_add_tail(&opt->dccpop_node, &dmsk->dccpms_pending);
  56. return 0;
  57. }
  58. EXPORT_SYMBOL_GPL(dccp_feat_change);
  59. static int dccp_feat_update_ccid(struct sock *sk, u8 type, u8 new_ccid_nr)
  60. {
  61. struct dccp_sock *dp = dccp_sk(sk);
  62. struct dccp_minisock *dmsk = dccp_msk(sk);
  63. /* figure out if we are changing our CCID or the peer's */
  64. const int rx = type == DCCPO_CHANGE_R;
  65. const u8 ccid_nr = rx ? dmsk->dccpms_rx_ccid : dmsk->dccpms_tx_ccid;
  66. struct ccid *new_ccid;
  67. /* Check if nothing is being changed. */
  68. if (ccid_nr == new_ccid_nr)
  69. return 0;
  70. new_ccid = ccid_new(new_ccid_nr, sk, rx, GFP_ATOMIC);
  71. if (new_ccid == NULL)
  72. return -ENOMEM;
  73. if (rx) {
  74. ccid_hc_rx_delete(dp->dccps_hc_rx_ccid, sk);
  75. dp->dccps_hc_rx_ccid = new_ccid;
  76. dmsk->dccpms_rx_ccid = new_ccid_nr;
  77. } else {
  78. ccid_hc_tx_delete(dp->dccps_hc_tx_ccid, sk);
  79. dp->dccps_hc_tx_ccid = new_ccid;
  80. dmsk->dccpms_tx_ccid = new_ccid_nr;
  81. }
  82. return 0;
  83. }
  84. /* XXX taking only u8 vals */
  85. static int dccp_feat_update(struct sock *sk, u8 type, u8 feat, u8 val)
  86. {
  87. dccp_feat_debug(type, feat, val);
  88. switch (feat) {
  89. case DCCPF_CCID:
  90. return dccp_feat_update_ccid(sk, type, val);
  91. default:
  92. dccp_pr_debug("UNIMPLEMENTED: %s(%d, ...)\n",
  93. dccp_feat_typename(type), feat);
  94. break;
  95. }
  96. return 0;
  97. }
  98. static int dccp_feat_reconcile(struct sock *sk, struct dccp_opt_pend *opt,
  99. u8 *rpref, u8 rlen)
  100. {
  101. struct dccp_sock *dp = dccp_sk(sk);
  102. u8 *spref, slen, *res = NULL;
  103. int i, j, rc, agree = 1;
  104. BUG_ON(rpref == NULL);
  105. /* check if we are the black sheep */
  106. if (dp->dccps_role == DCCP_ROLE_CLIENT) {
  107. spref = rpref;
  108. slen = rlen;
  109. rpref = opt->dccpop_val;
  110. rlen = opt->dccpop_len;
  111. } else {
  112. spref = opt->dccpop_val;
  113. slen = opt->dccpop_len;
  114. }
  115. /*
  116. * Now we have server preference list in spref and client preference in
  117. * rpref
  118. */
  119. BUG_ON(spref == NULL);
  120. BUG_ON(rpref == NULL);
  121. /* FIXME sanity check vals */
  122. /* Are values in any order? XXX Lame "algorithm" here */
  123. /* XXX assume values are 1 byte */
  124. for (i = 0; i < slen; i++) {
  125. for (j = 0; j < rlen; j++) {
  126. if (spref[i] == rpref[j]) {
  127. res = &spref[i];
  128. break;
  129. }
  130. }
  131. if (res)
  132. break;
  133. }
  134. /* we didn't agree on anything */
  135. if (res == NULL) {
  136. /* confirm previous value */
  137. switch (opt->dccpop_feat) {
  138. case DCCPF_CCID:
  139. /* XXX did i get this right? =P */
  140. if (opt->dccpop_type == DCCPO_CHANGE_L)
  141. res = &dccp_msk(sk)->dccpms_tx_ccid;
  142. else
  143. res = &dccp_msk(sk)->dccpms_rx_ccid;
  144. break;
  145. default:
  146. WARN_ON(1); /* XXX implement res */
  147. return -EFAULT;
  148. }
  149. dccp_pr_debug("Don't agree... reconfirming %d\n", *res);
  150. agree = 0; /* this is used for mandatory options... */
  151. }
  152. /* need to put result and our preference list */
  153. /* XXX assume 1 byte vals */
  154. rlen = 1 + opt->dccpop_len;
  155. rpref = kmalloc(rlen, GFP_ATOMIC);
  156. if (rpref == NULL)
  157. return -ENOMEM;
  158. *rpref = *res;
  159. memcpy(&rpref[1], opt->dccpop_val, opt->dccpop_len);
  160. /* put it in the "confirm queue" */
  161. if (opt->dccpop_sc == NULL) {
  162. opt->dccpop_sc = kmalloc(sizeof(*opt->dccpop_sc), GFP_ATOMIC);
  163. if (opt->dccpop_sc == NULL) {
  164. kfree(rpref);
  165. return -ENOMEM;
  166. }
  167. } else {
  168. /* recycle the confirm slot */
  169. BUG_ON(opt->dccpop_sc->dccpoc_val == NULL);
  170. kfree(opt->dccpop_sc->dccpoc_val);
  171. dccp_pr_debug("recycling confirm slot\n");
  172. }
  173. memset(opt->dccpop_sc, 0, sizeof(*opt->dccpop_sc));
  174. opt->dccpop_sc->dccpoc_val = rpref;
  175. opt->dccpop_sc->dccpoc_len = rlen;
  176. /* update the option on our side [we are about to send the confirm] */
  177. rc = dccp_feat_update(sk, opt->dccpop_type, opt->dccpop_feat, *res);
  178. if (rc) {
  179. kfree(opt->dccpop_sc->dccpoc_val);
  180. kfree(opt->dccpop_sc);
  181. opt->dccpop_sc = NULL;
  182. return rc;
  183. }
  184. dccp_pr_debug("Will confirm %d\n", *rpref);
  185. /* say we want to change to X but we just got a confirm X, suppress our
  186. * change
  187. */
  188. if (!opt->dccpop_conf) {
  189. if (*opt->dccpop_val == *res)
  190. opt->dccpop_conf = 1;
  191. dccp_pr_debug("won't ask for change of same feature\n");
  192. }
  193. return agree ? 0 : DCCP_FEAT_SP_NOAGREE; /* used for mandatory opts */
  194. }
  195. static int dccp_feat_sp(struct sock *sk, u8 type, u8 feature, u8 *val, u8 len)
  196. {
  197. struct dccp_minisock *dmsk = dccp_msk(sk);
  198. struct dccp_opt_pend *opt;
  199. int rc = 1;
  200. u8 t;
  201. /*
  202. * We received a CHANGE. We gotta match it against our own preference
  203. * list. If we got a CHANGE_R it means it's a change for us, so we need
  204. * to compare our CHANGE_L list.
  205. */
  206. if (type == DCCPO_CHANGE_L)
  207. t = DCCPO_CHANGE_R;
  208. else
  209. t = DCCPO_CHANGE_L;
  210. /* find our preference list for this feature */
  211. list_for_each_entry(opt, &dmsk->dccpms_pending, dccpop_node) {
  212. if (opt->dccpop_type != t || opt->dccpop_feat != feature)
  213. continue;
  214. /* find the winner from the two preference lists */
  215. rc = dccp_feat_reconcile(sk, opt, val, len);
  216. break;
  217. }
  218. /* We didn't deal with the change. This can happen if we have no
  219. * preference list for the feature. In fact, it just shouldn't
  220. * happen---if we understand a feature, we should have a preference list
  221. * with at least the default value.
  222. */
  223. BUG_ON(rc == 1);
  224. return rc;
  225. }
  226. static int dccp_feat_nn(struct sock *sk, u8 type, u8 feature, u8 *val, u8 len)
  227. {
  228. struct dccp_opt_pend *opt;
  229. struct dccp_minisock *dmsk = dccp_msk(sk);
  230. u8 *copy;
  231. int rc;
  232. /* NN features must be Change L (sec. 6.3.2) */
  233. if (type != DCCPO_CHANGE_L) {
  234. dccp_pr_debug("received %s for NN feature %d\n",
  235. dccp_feat_typename(type), feature);
  236. return -EFAULT;
  237. }
  238. /* XXX sanity check opt val */
  239. /* copy option so we can confirm it */
  240. opt = kzalloc(sizeof(*opt), GFP_ATOMIC);
  241. if (opt == NULL)
  242. return -ENOMEM;
  243. copy = kmemdup(val, len, GFP_ATOMIC);
  244. if (copy == NULL) {
  245. kfree(opt);
  246. return -ENOMEM;
  247. }
  248. opt->dccpop_type = DCCPO_CONFIRM_R; /* NN can only confirm R */
  249. opt->dccpop_feat = feature;
  250. opt->dccpop_val = copy;
  251. opt->dccpop_len = len;
  252. /* change feature */
  253. rc = dccp_feat_update(sk, type, feature, *val);
  254. if (rc) {
  255. kfree(opt->dccpop_val);
  256. kfree(opt);
  257. return rc;
  258. }
  259. dccp_feat_debug(type, feature, *copy);
  260. list_add_tail(&opt->dccpop_node, &dmsk->dccpms_conf);
  261. return 0;
  262. }
  263. static void dccp_feat_empty_confirm(struct dccp_minisock *dmsk,
  264. u8 type, u8 feature)
  265. {
  266. /* XXX check if other confirms for that are queued and recycle slot */
  267. struct dccp_opt_pend *opt = kzalloc(sizeof(*opt), GFP_ATOMIC);
  268. if (opt == NULL) {
  269. /* XXX what do we do? Ignoring should be fine. It's a change
  270. * after all =P
  271. */
  272. return;
  273. }
  274. switch (type) {
  275. case DCCPO_CHANGE_L: opt->dccpop_type = DCCPO_CONFIRM_R; break;
  276. case DCCPO_CHANGE_R: opt->dccpop_type = DCCPO_CONFIRM_L; break;
  277. default: pr_info("invalid type %d\n", type); return;
  278. }
  279. opt->dccpop_feat = feature;
  280. opt->dccpop_val = NULL;
  281. opt->dccpop_len = 0;
  282. /* change feature */
  283. dccp_pr_debug("Empty %s(%d)\n", dccp_feat_typename(type), feature);
  284. list_add_tail(&opt->dccpop_node, &dmsk->dccpms_conf);
  285. }
  286. static void dccp_feat_flush_confirm(struct sock *sk)
  287. {
  288. struct dccp_minisock *dmsk = dccp_msk(sk);
  289. /* Check if there is anything to confirm in the first place */
  290. int yes = !list_empty(&dmsk->dccpms_conf);
  291. if (!yes) {
  292. struct dccp_opt_pend *opt;
  293. list_for_each_entry(opt, &dmsk->dccpms_pending, dccpop_node) {
  294. if (opt->dccpop_conf) {
  295. yes = 1;
  296. break;
  297. }
  298. }
  299. }
  300. if (!yes)
  301. return;
  302. /* OK there is something to confirm... */
  303. /* XXX check if packet is in flight? Send delayed ack?? */
  304. if (sk->sk_state == DCCP_OPEN)
  305. dccp_send_ack(sk);
  306. }
  307. int dccp_feat_change_recv(struct sock *sk, u8 type, u8 feature, u8 *val, u8 len)
  308. {
  309. int rc;
  310. dccp_feat_debug(type, feature, *val);
  311. /* figure out if it's SP or NN feature */
  312. switch (feature) {
  313. /* deal with SP features */
  314. case DCCPF_CCID:
  315. rc = dccp_feat_sp(sk, type, feature, val, len);
  316. break;
  317. /* deal with NN features */
  318. case DCCPF_ACK_RATIO:
  319. rc = dccp_feat_nn(sk, type, feature, val, len);
  320. break;
  321. /* XXX implement other features */
  322. default:
  323. dccp_pr_debug("UNIMPLEMENTED: not handling %s(%d, ...)\n",
  324. dccp_feat_typename(type), feature);
  325. rc = -EFAULT;
  326. break;
  327. }
  328. /* check if there were problems changing features */
  329. if (rc) {
  330. /* If we don't agree on SP, we sent a confirm for old value.
  331. * However we propagate rc to caller in case option was
  332. * mandatory
  333. */
  334. if (rc != DCCP_FEAT_SP_NOAGREE)
  335. dccp_feat_empty_confirm(dccp_msk(sk), type, feature);
  336. }
  337. /* generate the confirm [if required] */
  338. dccp_feat_flush_confirm(sk);
  339. return rc;
  340. }
  341. EXPORT_SYMBOL_GPL(dccp_feat_change_recv);
  342. int dccp_feat_confirm_recv(struct sock *sk, u8 type, u8 feature,
  343. u8 *val, u8 len)
  344. {
  345. u8 t;
  346. struct dccp_opt_pend *opt;
  347. struct dccp_minisock *dmsk = dccp_msk(sk);
  348. int found = 0;
  349. int all_confirmed = 1;
  350. dccp_feat_debug(type, feature, *val);
  351. /* locate our change request */
  352. switch (type) {
  353. case DCCPO_CONFIRM_L: t = DCCPO_CHANGE_R; break;
  354. case DCCPO_CONFIRM_R: t = DCCPO_CHANGE_L; break;
  355. default: pr_info("invalid type %d\n", type);
  356. return 1;
  357. }
  358. /* XXX sanity check feature value */
  359. list_for_each_entry(opt, &dmsk->dccpms_pending, dccpop_node) {
  360. if (!opt->dccpop_conf && opt->dccpop_type == t &&
  361. opt->dccpop_feat == feature) {
  362. found = 1;
  363. dccp_pr_debug("feature %d found\n", opt->dccpop_feat);
  364. /* XXX do sanity check */
  365. opt->dccpop_conf = 1;
  366. /* We got a confirmation---change the option */
  367. dccp_feat_update(sk, opt->dccpop_type,
  368. opt->dccpop_feat, *val);
  369. /* XXX check the return value of dccp_feat_update */
  370. break;
  371. }
  372. if (!opt->dccpop_conf)
  373. all_confirmed = 0;
  374. }
  375. /* fix re-transmit timer */
  376. /* XXX gotta make sure that no option negotiation occurs during
  377. * connection shutdown. Consider that the CLOSEREQ is sent and timer is
  378. * on. if all options are confirmed it might kill timer which should
  379. * remain alive until close is received.
  380. */
  381. if (all_confirmed) {
  382. dccp_pr_debug("clear feat negotiation timer %p\n", sk);
  383. inet_csk_clear_xmit_timer(sk, ICSK_TIME_RETRANS);
  384. }
  385. if (!found)
  386. dccp_pr_debug("%s(%d, ...) never requested\n",
  387. dccp_feat_typename(type), feature);
  388. return 0;
  389. }
  390. EXPORT_SYMBOL_GPL(dccp_feat_confirm_recv);
  391. void dccp_feat_clean(struct dccp_minisock *dmsk)
  392. {
  393. struct dccp_opt_pend *opt, *next;
  394. list_for_each_entry_safe(opt, next, &dmsk->dccpms_pending,
  395. dccpop_node) {
  396. BUG_ON(opt->dccpop_val == NULL);
  397. kfree(opt->dccpop_val);
  398. if (opt->dccpop_sc != NULL) {
  399. BUG_ON(opt->dccpop_sc->dccpoc_val == NULL);
  400. kfree(opt->dccpop_sc->dccpoc_val);
  401. kfree(opt->dccpop_sc);
  402. }
  403. kfree(opt);
  404. }
  405. INIT_LIST_HEAD(&dmsk->dccpms_pending);
  406. list_for_each_entry_safe(opt, next, &dmsk->dccpms_conf, dccpop_node) {
  407. BUG_ON(opt == NULL);
  408. if (opt->dccpop_val != NULL)
  409. kfree(opt->dccpop_val);
  410. kfree(opt);
  411. }
  412. INIT_LIST_HEAD(&dmsk->dccpms_conf);
  413. }
  414. EXPORT_SYMBOL_GPL(dccp_feat_clean);
  415. /* this is to be called only when a listening sock creates its child. It is
  416. * assumed by the function---the confirm is not duplicated, but rather it is
  417. * "passed on".
  418. */
  419. int dccp_feat_clone(struct sock *oldsk, struct sock *newsk)
  420. {
  421. struct dccp_minisock *olddmsk = dccp_msk(oldsk);
  422. struct dccp_minisock *newdmsk = dccp_msk(newsk);
  423. struct dccp_opt_pend *opt;
  424. int rc = 0;
  425. INIT_LIST_HEAD(&newdmsk->dccpms_pending);
  426. INIT_LIST_HEAD(&newdmsk->dccpms_conf);
  427. list_for_each_entry(opt, &olddmsk->dccpms_pending, dccpop_node) {
  428. struct dccp_opt_pend *newopt;
  429. /* copy the value of the option */
  430. u8 *val = kmemdup(opt->dccpop_val, opt->dccpop_len, GFP_ATOMIC);
  431. if (val == NULL)
  432. goto out_clean;
  433. newopt = kmemdup(opt, sizeof(*newopt), GFP_ATOMIC);
  434. if (newopt == NULL) {
  435. kfree(val);
  436. goto out_clean;
  437. }
  438. /* insert the option */
  439. newopt->dccpop_val = val;
  440. list_add_tail(&newopt->dccpop_node, &newdmsk->dccpms_pending);
  441. /* XXX what happens with backlogs and multiple connections at
  442. * once...
  443. */
  444. /* the master socket no longer needs to worry about confirms */
  445. opt->dccpop_sc = NULL; /* it's not a memleak---new socket has it */
  446. /* reset state for a new socket */
  447. opt->dccpop_conf = 0;
  448. }
  449. /* XXX not doing anything about the conf queue */
  450. out:
  451. return rc;
  452. out_clean:
  453. dccp_feat_clean(newdmsk);
  454. rc = -ENOMEM;
  455. goto out;
  456. }
  457. EXPORT_SYMBOL_GPL(dccp_feat_clone);
  458. static int __dccp_feat_init(struct dccp_minisock *dmsk, u8 type, u8 feat,
  459. u8 *val, u8 len)
  460. {
  461. int rc = -ENOMEM;
  462. u8 *copy = kmemdup(val, len, GFP_KERNEL);
  463. if (copy != NULL) {
  464. rc = dccp_feat_change(dmsk, type, feat, copy, len, GFP_KERNEL);
  465. if (rc)
  466. kfree(copy);
  467. }
  468. return rc;
  469. }
  470. int dccp_feat_init(struct dccp_minisock *dmsk)
  471. {
  472. int rc;
  473. INIT_LIST_HEAD(&dmsk->dccpms_pending);
  474. INIT_LIST_HEAD(&dmsk->dccpms_conf);
  475. /* CCID L */
  476. rc = __dccp_feat_init(dmsk, DCCPO_CHANGE_L, DCCPF_CCID,
  477. &dmsk->dccpms_tx_ccid, 1);
  478. if (rc)
  479. goto out;
  480. /* CCID R */
  481. rc = __dccp_feat_init(dmsk, DCCPO_CHANGE_R, DCCPF_CCID,
  482. &dmsk->dccpms_rx_ccid, 1);
  483. if (rc)
  484. goto out;
  485. /* Ack ratio */
  486. rc = __dccp_feat_init(dmsk, DCCPO_CHANGE_L, DCCPF_ACK_RATIO,
  487. &dmsk->dccpms_ack_ratio, 1);
  488. out:
  489. return rc;
  490. }
  491. EXPORT_SYMBOL_GPL(dccp_feat_init);
  492. #ifdef CONFIG_IP_DCCP_DEBUG
  493. const char *dccp_feat_typename(const u8 type)
  494. {
  495. switch(type) {
  496. case DCCPO_CHANGE_L: return("ChangeL");
  497. case DCCPO_CONFIRM_L: return("ConfirmL");
  498. case DCCPO_CHANGE_R: return("ChangeR");
  499. case DCCPO_CONFIRM_R: return("ConfirmR");
  500. /* the following case must not appear in feature negotation */
  501. default: dccp_pr_debug("unknown type %d [BUG!]\n", type);
  502. }
  503. return NULL;
  504. }
  505. EXPORT_SYMBOL_GPL(dccp_feat_typename);
  506. const char *dccp_feat_name(const u8 feat)
  507. {
  508. static const char *feature_names[] = {
  509. [DCCPF_RESERVED] = "Reserved",
  510. [DCCPF_CCID] = "CCID",
  511. [DCCPF_SHORT_SEQNOS] = "Allow Short Seqnos",
  512. [DCCPF_SEQUENCE_WINDOW] = "Sequence Window",
  513. [DCCPF_ECN_INCAPABLE] = "ECN Incapable",
  514. [DCCPF_ACK_RATIO] = "Ack Ratio",
  515. [DCCPF_SEND_ACK_VECTOR] = "Send ACK Vector",
  516. [DCCPF_SEND_NDP_COUNT] = "Send NDP Count",
  517. [DCCPF_MIN_CSUM_COVER] = "Min. Csum Coverage",
  518. [DCCPF_DATA_CHECKSUM] = "Send Data Checksum",
  519. };
  520. if (feat >= DCCPF_MIN_CCID_SPECIFIC)
  521. return "CCID-specific";
  522. if (dccp_feat_is_reserved(feat))
  523. return feature_names[DCCPF_RESERVED];
  524. return feature_names[feat];
  525. }
  526. EXPORT_SYMBOL_GPL(dccp_feat_name);
  527. #endif /* CONFIG_IP_DCCP_DEBUG */