vserver 1.9.5.x5
[linux-2.6.git] / net / sctp / output.c
index d54f915..9013f64 100644 (file)
@@ -110,7 +110,7 @@ struct sctp_packet *sctp_packet_init(struct sctp_packet *packet,
        packet->destination_port = dport;
        skb_queue_head_init(&packet->chunks);
        if (asoc) {
-               struct sctp_opt *sp = sctp_sk(asoc->base.sk);   
+               struct sctp_sock *sp = sctp_sk(asoc->base.sk);  
                overhead = sp->pf->af->net_header_len; 
        } else {
                overhead = sizeof(struct ipv6hdr);
@@ -133,7 +133,7 @@ void sctp_packet_free(struct sctp_packet *packet)
 
        SCTP_DEBUG_PRINTK("%s: packet:%p\n", __FUNCTION__, packet);
 
-        while ((chunk = (struct sctp_chunk *)__skb_dequeue(&packet->chunks)))
+        while ((chunk = (struct sctp_chunk *)__skb_dequeue(&packet->chunks)) != NULL)
                sctp_chunk_free(chunk);
 
        if (packet->malloced)
@@ -370,7 +370,7 @@ int sctp_packet_transmit(struct sctp_packet *packet)
         * [This whole comment explains WORD_ROUND() below.]
         */
        SCTP_DEBUG_PRINTK("***sctp_transmit_packet***\n");
-       while ((chunk = (struct sctp_chunk *)__skb_dequeue(&packet->chunks))) {
+       while ((chunk = (struct sctp_chunk *)__skb_dequeue(&packet->chunks)) != NULL) {
                if (sctp_chunk_is_data(chunk)) {
 
                        if (!chunk->has_tsn) {
@@ -496,7 +496,7 @@ out:
        return err;
 no_route:
        kfree_skb(nskb);
-       IP_INC_STATS_BH(OutNoRoutes);
+       IP_INC_STATS_BH(IPSTATS_MIB_OUTNOROUTES);
 
        /* FIXME: Returning the 'err' will effect all the associations
         * associated with a socket, although only one of the paths of the
@@ -511,7 +511,7 @@ err:
         * will get resent or dropped later.
         */
 
-       while ((chunk = (struct sctp_chunk *)__skb_dequeue(&packet->chunks))) {
+       while ((chunk = (struct sctp_chunk *)__skb_dequeue(&packet->chunks)) != NULL) {
                if (!sctp_chunk_is_data(chunk))
                        sctp_chunk_free(chunk);
        }
@@ -534,7 +534,7 @@ static sctp_xmit_t sctp_packet_append_data(struct sctp_packet *packet,
        struct sctp_transport *transport = packet->transport;
        __u32 max_burst_bytes;
        struct sctp_association *asoc = transport->asoc;
-       struct sctp_opt *sp = sctp_sk(asoc->base.sk);
+       struct sctp_sock *sp = sctp_sk(asoc->base.sk);
        struct sctp_outq *q = &asoc->outqueue;
 
        /* RFC 2960 6.1  Transmission of DATA Chunks