feat.c (e5451c8f8330e03ad3cfa16048b4daf961af434f) | feat.c (e90ce2fc27cad7e7b1e72b9e66201a7a4c124c2b) |
---|---|
1/* 2 * net/dccp/feat.c 3 * 4 * Feature negotiation for the DCCP protocol (RFC 4340, section 6) 5 * 6 * Copyright (c) 2008 Gerrit Renker <gerrit@erg.abdn.ac.uk> 7 * Rewrote from scratch, some bits from earlier code by 8 * Copyright (c) 2005 Andrea Bittau <a.bittau@cs.ucl.ac.uk> --- 1457 unchanged lines hidden (view full) --- 1466 return rc; 1467 1468 /* 1469 * We advertise the available list of CCIDs and reorder according to 1470 * preferences, to avoid failure resulting from negotiating different 1471 * singleton values (which always leads to failure). 1472 * These settings can still (later) be overridden via sockopts. 1473 */ | 1/* 2 * net/dccp/feat.c 3 * 4 * Feature negotiation for the DCCP protocol (RFC 4340, section 6) 5 * 6 * Copyright (c) 2008 Gerrit Renker <gerrit@erg.abdn.ac.uk> 7 * Rewrote from scratch, some bits from earlier code by 8 * Copyright (c) 2005 Andrea Bittau <a.bittau@cs.ucl.ac.uk> --- 1457 unchanged lines hidden (view full) --- 1466 return rc; 1467 1468 /* 1469 * We advertise the available list of CCIDs and reorder according to 1470 * preferences, to avoid failure resulting from negotiating different 1471 * singleton values (which always leads to failure). 1472 * These settings can still (later) be overridden via sockopts. 1473 */ |
1474 if (ccid_get_builtin_ccids(&tx.val, &tx.len) || 1475 ccid_get_builtin_ccids(&rx.val, &rx.len)) | 1474 if (ccid_get_builtin_ccids(&tx.val, &tx.len)) |
1476 return -ENOBUFS; | 1475 return -ENOBUFS; |
1476 if (ccid_get_builtin_ccids(&rx.val, &rx.len)) { 1477 kfree(tx.val); 1478 return -ENOBUFS; 1479 } |
|
1477 1478 if (!dccp_feat_prefer(sysctl_dccp_tx_ccid, tx.val, tx.len) || 1479 !dccp_feat_prefer(sysctl_dccp_rx_ccid, rx.val, rx.len)) 1480 goto free_ccid_lists; 1481 1482 rc = __feat_register_sp(fn, DCCPF_CCID, true, false, tx.val, tx.len); 1483 if (rc) 1484 goto free_ccid_lists; --- 77 unchanged lines hidden --- | 1480 1481 if (!dccp_feat_prefer(sysctl_dccp_tx_ccid, tx.val, tx.len) || 1482 !dccp_feat_prefer(sysctl_dccp_rx_ccid, rx.val, rx.len)) 1483 goto free_ccid_lists; 1484 1485 rc = __feat_register_sp(fn, DCCPF_CCID, true, false, tx.val, tx.len); 1486 if (rc) 1487 goto free_ccid_lists; --- 77 unchanged lines hidden --- |