Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[powerpc.git] / net / dccp / options.c
index 7e50678..ca13f77 100644 (file)
@@ -62,6 +62,7 @@ int dccp_parse_options(struct sock *sk, struct sk_buff *skb)
        struct dccp_sock *dp = dccp_sk(sk);
        const struct dccp_hdr *dh = dccp_hdr(skb);
        const u8 pkt_type = DCCP_SKB_CB(skb)->dccpd_type;
+       u64 ackno = DCCP_SKB_CB(skb)->dccpd_ack_seq;
        unsigned char *options = (unsigned char *)dh + dccp_hdr_len(skb);
        unsigned char *opt_ptr = options;
        const unsigned char *opt_end = (unsigned char *)dh +
@@ -149,7 +150,7 @@ int dccp_parse_options(struct sock *sk, struct sk_buff *skb)
                                break;
 
                        if (dccp_msk(sk)->dccpms_send_ack_vector &&
-                           dccp_ackvec_parse(sk, skb, opt, value, len))
+                           dccp_ackvec_parse(sk, skb, &ackno, opt, value, len))
                                goto out_invalid_option;
                        break;
                case DCCPO_TIMESTAMP:
@@ -238,11 +239,10 @@ int dccp_parse_options(struct sock *sk, struct sk_buff *skb)
                }
                        break;
                default:
-                       pr_info("DCCP(%p): option %d(len=%d) not "
-                               "implemented, ignoring\n",
-                               sk, opt, len);
+                       DCCP_CRIT("DCCP(%p): option %d(len=%d) not "
+                                 "implemented, ignoring", sk, opt, len);
                        break;
-               }
+               }
 
                if (opt != DCCPO_MANDATORY)
                        mandatory = 0;
@@ -257,7 +257,7 @@ int dccp_parse_options(struct sock *sk, struct sk_buff *skb)
 out_invalid_option:
        DCCP_INC_STATS_BH(DCCP_MIB_INVALIDOPT);
        DCCP_SKB_CB(skb)->dccpd_reset_code = DCCP_RESET_CODE_OPTION_ERROR;
-       pr_info("DCCP(%p): invalid option %d, len=%d\n", sk, opt, len);
+       DCCP_WARN("DCCP(%p): invalid option %d, len=%d", sk, opt, len);
        return -1;
 }
 
@@ -442,13 +442,12 @@ static int dccp_insert_option_timestamp_echo(struct sock *sk,
 }
 
 static int dccp_insert_feat_opt(struct sk_buff *skb, u8 type, u8 feat,
-                               u8 *val, u8 len)
+                               u8 *val, u8 len)
 {
        u8 *to;
 
        if (DCCP_SKB_CB(skb)->dccpd_opt_len + len + 3 > DCCP_MAX_OPT_LEN) {
-               LIMIT_NETDEBUG(KERN_INFO "DCCP: packet too small"
-                              " to insert feature %d option!\n", feat);
+               DCCP_WARN("packet too small for feature %d option!\n", feat);
                return -1;
        }
 
@@ -558,11 +557,6 @@ int dccp_insert_options(struct sock *sk, struct sk_buff *skb)
                        return -1;
                dp->dccps_hc_rx_insert_options = 0;
        }
-       if (dp->dccps_hc_tx_insert_options) {
-               if (ccid_hc_tx_insert_options(dp->dccps_hc_tx_ccid, sk, skb))
-                       return -1;
-               dp->dccps_hc_tx_insert_options = 0;
-       }
 
        /* Feature negotiation */
        /* Data packets can't do feat negotiation */