]> Pileus Git - ~andy/linux/blobdiff - net/sctp/sm_make_chunk.c
sctp: remove 'resent' bit from the chunk
[~andy/linux] / net / sctp / sm_make_chunk.c
index 9e732916b671bde5893681f2e6690244260f0da2..24effdf471eb1553f2d1712bff92160def52d412 100644 (file)
@@ -58,6 +58,7 @@
 #include <linux/inet.h>
 #include <linux/scatterlist.h>
 #include <linux/crypto.h>
+#include <linux/slab.h>
 #include <net/sock.h>
 
 #include <linux/skbuff.h>
@@ -418,10 +419,17 @@ struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *asoc,
        if (!retval)
                goto nomem_chunk;
 
-       /* Per the advice in RFC 2960 6.4, send this reply to
-        * the source of the INIT packet.
+       /* RFC 2960 6.4 Multi-homed SCTP Endpoints
+        *
+        * An endpoint SHOULD transmit reply chunks (e.g., SACK,
+        * HEARTBEAT ACK, * etc.) to the same destination transport
+        * address from which it received the DATA or control chunk
+        * to which it is replying.
+        *
+        * [INIT ACK back to where the INIT came from.]
         */
        retval->transport = chunk->transport;
+
        retval->subh.init_hdr =
                sctp_addto_chunk(retval, sizeof(initack), &initack);
        retval->param_hdr.v = sctp_addto_chunk(retval, addrs_len, addrs.v);
@@ -460,18 +468,6 @@ struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *asoc,
        /* We need to remove the const qualifier at this point.  */
        retval->asoc = (struct sctp_association *) asoc;
 
-       /* RFC 2960 6.4 Multi-homed SCTP Endpoints
-        *
-        * An endpoint SHOULD transmit reply chunks (e.g., SACK,
-        * HEARTBEAT ACK, * etc.) to the same destination transport
-        * address from which it received the DATA or control chunk
-        * to which it is replying.
-        *
-        * [INIT ACK back to where the INIT came from.]
-        */
-       if (chunk)
-               retval->transport = chunk->transport;
-
 nomem_chunk:
        kfree(cookie);
 nomem_cookie:
@@ -1209,7 +1205,6 @@ struct sctp_chunk *sctp_chunkify(struct sk_buff *skb,
        INIT_LIST_HEAD(&retval->list);
        retval->skb             = skb;
        retval->asoc            = (struct sctp_association *)asoc;
-       retval->resent          = 0;
        retval->has_tsn         = 0;
        retval->has_ssn         = 0;
        retval->rtt_in_progress = 0;