Skip to contentSkip to conversation

sctp: fix to reset packet information after packet transmit

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

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

PATCH 1/2 sctp: fix to reset packet information after packet transmit

The packet information does not reset after packet transmit, this may cause some problems such as following DATA chunk be sent without AUTH chunk, even if the authentication of DATA chunk has been requested by the peer.

---
 net/sctp/output.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
net/sctp/output.c +5 -0
index b94c211..fbbfbce 100644
@@ -599,6 +599,11 @@ int sctp_packet_transmit(struct sctp_packet *packet)
 
 out:
 	packet->size = packet->overhead;
+	packet->has_cookie_echo = 0;
+	packet->has_sack = 0;
+	packet->has_data = 0;
+	packet->ipfragok = 0;
+	packet->auth = NULL;
 	return err;
 no_route:
 	kfree_skb(nskb);
Signature · 1 line
1.6.2.2
#1 lore raw

Re: [PATCH 1/2] sctp: fix to reset packet information after packet

Quoted 15 lines · Wei Yongjun

The packet information does not reset after packet transmit, this may cause some problems such as following DATA chunk be sent without AUTH chunk, even if the authentication of DATA chunk has been requested by the peer.

---
 net/sctp/output.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
net/sctp/output.c +0 -0
index b94c211..fbbfbce 100644

net/sctp/output.c int sctp_packet_transmit(struct sctp_packet *packet) · line 606

Quoted 8 lines
net/sctp/output.c +5 -0
@@ -599,6 +599,11 @@ int sctp_packet_transmit(struct sctp_packet *packet)
 
 out:
 	packet->size = packet->overhead;
+	packet->has_cookie_echo = 0;
+	packet->has_sack = 0;
+	packet->has_data = 0;
+	packet->ipfragok = 0;
+	packet->auth = NULL;

I'll stick this into sctp_packet_reset(). OK?

-vlad

Quoted 3 lines
net/sctp/output.c +0 -0
 	return err;
 no_route:
 	kfree_skb(nskb);