Skip to contentSkip to conversation

sctp: remove no used member from struct sctp_packet

PATCH In review Wei Yongjun 2 participants 2 messages Sep 2, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 sctp: remove no used member from struct sctp_packet

member has_auth of struct sctp_packet is defined and set, but not used. struct sctp_packet has auth member can indicate the packet contains an AUTH chunk. So this patch remove it.

---
 include/net/sctp/structs.h |    3 ---
 net/sctp/output.c          |    5 -----
 2 files changed, 0 insertions(+), 8 deletions(-)
include/net/sctp/structs.h +0 -3
index edfcacf..9996097 100644
@@ -817,9 +817,6 @@ struct sctp_packet {
 	/* This packet contains a SACK chunk. */
 	__u8 has_sack;
 
-	/* This packet contains an AUTH chunk */
-	__u8 has_auth;
-
 	/* This packet contains at least 1 DATA chunk */
 	__u8 has_data;
 
net/sctp/output.c +0 -5
index fbbfbce..c115e8b 100644
@@ -78,7 +78,6 @@ struct sctp_packet *sctp_packet_config(struct sctp_packet *packet,
 	packet->vtag = vtag;
 	packet->has_cookie_echo = 0;
 	packet->has_sack = 0;
-	packet->has_auth = 0;
 	packet->has_data = 0;
 	packet->ipfragok = 0;
 	packet->auth = NULL;
@@ -123,7 +122,6 @@ struct sctp_packet *sctp_packet_init(struct sctp_packet *packet,
 	packet->vtag = 0;
 	packet->has_cookie_echo = 0;
 	packet->has_sack = 0;
-	packet->has_auth = 0;
 	packet->has_data = 0;
 	packet->ipfragok = 0;
 	packet->malloced = 0;
@@ -325,8 +323,6 @@ append:
 			goto finish;
 		/* Disallow SACK bundling after DATA. */
 		packet->has_sack = 1;
-		/* Disallow AUTH bundling after DATA */
-		packet->has_auth = 1;
 		/* Let it be knows that packet has DATA in it */
 		packet->has_data = 1;
 		/* timestamp the chunk for rtx purposes */
@@ -341,7 +337,6 @@ append:
 		break;
 
 	    case SCTP_CID_AUTH:
-		packet->has_auth = 1;
 		packet->auth = chunk;
 		break;
 	}
Signature · 1 line
1.6.2.2
#1 lore raw
Quoted 5 lines · Wei Yongjun

member has_auth of struct sctp_packet is defined and set, but not used. struct sctp_packet has auth member can indicate the packet contains an AUTH chunk. So this patch remove it.

No, we should instead be using 'has_auth'. It will be especially useful when we update the AUTH api, since it changes the way DATA is signed.

-vlad

Quoted 57 lines
---
 include/net/sctp/structs.h |    3 ---
 net/sctp/output.c          |    5 -----
 2 files changed, 0 insertions(+), 8 deletions(-)
include/net/sctp/structs.h +0 -3
index edfcacf..9996097 100644
@@ -817,9 +817,6 @@ struct sctp_packet {
 	/* This packet contains a SACK chunk. */
 	__u8 has_sack;
 
-	/* This packet contains an AUTH chunk */
-	__u8 has_auth;
-
 	/* This packet contains at least 1 DATA chunk */
 	__u8 has_data;
 
net/sctp/output.c +0 -5
index fbbfbce..c115e8b 100644
@@ -78,7 +78,6 @@ struct sctp_packet *sctp_packet_config(struct sctp_packet *packet,
 	packet->vtag = vtag;
 	packet->has_cookie_echo = 0;
 	packet->has_sack = 0;
-	packet->has_auth = 0;
 	packet->has_data = 0;
 	packet->ipfragok = 0;
 	packet->auth = NULL;
@@ -123,7 +122,6 @@ struct sctp_packet *sctp_packet_init(struct sctp_packet *packet,
 	packet->vtag = 0;
 	packet->has_cookie_echo = 0;
 	packet->has_sack = 0;
-	packet->has_auth = 0;
 	packet->has_data = 0;
 	packet->ipfragok = 0;
 	packet->malloced = 0;
@@ -325,8 +323,6 @@ append:
 			goto finish;
 		/* Disallow SACK bundling after DATA. */
 		packet->has_sack = 1;
-		/* Disallow AUTH bundling after DATA */
-		packet->has_auth = 1;
 		/* Let it be knows that packet has DATA in it */
 		packet->has_data = 1;
 		/* timestamp the chunk for rtx purposes */
@@ -341,7 +337,6 @@ append:
 		break;
 
 	    case SCTP_CID_AUTH:
-		packet->has_auth = 1;
 		packet->auth = chunk;
 		break;
 	}