sctp: fix the name of struct sctp_shutdown_chunk_t
authorXin Long <lucien.xin@gmail.com>
Thu, 3 Aug 2017 07:42:10 +0000 (15:42 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Aug 2017 16:45:46 +0000 (09:45 -0700)
This patch is to fix the name of struct sctp_shutdown_chunk_t
, replace with struct sctp_initack_chunk in the places where
it's using it.

It is also to fix some indent problem.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/sctp.h
net/sctp/sm_statefuns.c

index 7a586ba7dcd4388876087b9206bfdb21565b67e8..553020cbf6f79e0e04ee1ff28a84fed24bbe7849 100644 (file)
@@ -420,7 +420,7 @@ struct sctp_shutdownhdr {
        __be32 cum_tsn_ack;
 };
 
-struct sctp_shutdown_chunk_t {
+struct sctp_shutdown_chunk {
        struct sctp_chunkhdr chunk_hdr;
        struct sctp_shutdownhdr shutdown_hdr;
 };
index 5b95e2d8c2276d1cac8c37320c9ed11c5a8a6306..d4d8fab52a1148034301e560fe2a5d0758e8fef0 100644 (file)
@@ -2665,8 +2665,7 @@ sctp_disposition_t sctp_sf_do_9_2_shutdown(struct net *net,
                return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands);
 
        /* Make sure that the SHUTDOWN chunk has a valid length. */
-       if (!sctp_chunk_length_valid(chunk,
-                                     sizeof(struct sctp_shutdown_chunk_t)))
+       if (!sctp_chunk_length_valid(chunk, sizeof(struct sctp_shutdown_chunk)))
                return sctp_sf_violation_chunklen(net, ep, asoc, type, arg,
                                                  commands);
 
@@ -2753,8 +2752,7 @@ sctp_disposition_t sctp_sf_do_9_2_shut_ctsn(struct net *net,
                return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands);
 
        /* Make sure that the SHUTDOWN chunk has a valid length. */
-       if (!sctp_chunk_length_valid(chunk,
-                                     sizeof(struct sctp_shutdown_chunk_t)))
+       if (!sctp_chunk_length_valid(chunk, sizeof(struct sctp_shutdown_chunk)))
                return sctp_sf_violation_chunklen(net, ep, asoc, type, arg,
                                                  commands);
 
@@ -5419,12 +5417,14 @@ sctp_disposition_t sctp_sf_do_9_2_shutdown_ack(
         */
        if (chunk) {
                if (!sctp_vtag_verify(chunk, asoc))
-                       return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands);
+                       return sctp_sf_pdiscard(net, ep, asoc, type, arg,
+                                               commands);
 
                /* Make sure that the SHUTDOWN chunk has a valid length. */
-               if (!sctp_chunk_length_valid(chunk, sizeof(struct sctp_shutdown_chunk_t)))
-                       return sctp_sf_violation_chunklen(net, ep, asoc, type, arg,
-                                                         commands);
+               if (!sctp_chunk_length_valid(
+                               chunk, sizeof(struct sctp_shutdown_chunk)))
+                       return sctp_sf_violation_chunklen(net, ep, asoc, type,
+                                                         arg, commands);
        }
 
        /* If it has no more outstanding DATA chunks, the SHUTDOWN receiver