]> err.no Git - linux-2.6/blobdiff - net/dccp/ccids/ccid2.c
ipv6: syncookies: free reqsk on xfrm_lookup error
[linux-2.6] / net / dccp / ccids / ccid2.c
index 48eeb4494e8d52accd2935cb37f554876522e1bd..8e9580874216aff323c42d9b43cf8517027e7ed5 100644 (file)
@@ -716,7 +716,7 @@ static int ccid2_hc_tx_init(struct ccid *ccid, struct sock *sk)
         * packets for new connections, following the rules from [RFC3390]".
         * We need to convert the bytes of RFC3390 into the packets of RFC 4341.
         */
-       hctx->ccid2hctx_cwnd = min(4U, max(2U, 4380U / dp->dccps_mss_cache));
+       hctx->ccid2hctx_cwnd = clamp(4380U / dp->dccps_mss_cache, 2U, 4U);
 
        /* Make sure that Ack Ratio is enabled and within bounds. */
        max_ratio = DIV_ROUND_UP(hctx->ccid2hctx_cwnd, 2);
@@ -770,7 +770,7 @@ static void ccid2_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb)
 
 static struct ccid_operations ccid2 = {
        .ccid_id                = DCCPC_CCID2,
-       .ccid_name              = "ccid2",
+       .ccid_name              = "TCP-like",
        .ccid_owner             = THIS_MODULE,
        .ccid_hc_tx_obj_size    = sizeof(struct ccid2_hc_tx_sock),
        .ccid_hc_tx_init        = ccid2_hc_tx_init,