linux-sctp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] sctp: fix to reset packet information after packet transmit
@ 2009-09-02  5:05 Wei Yongjun
  2009-09-02 14:41 ` [PATCH 1/2] sctp: fix to reset packet information after packet Vlad Yasevich
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2009-09-02  5:05 UTC (permalink / raw)
  To: linux-sctp

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.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
 net/sctp/output.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/net/sctp/output.c b/net/sctp/output.c
index b94c211..fbbfbce 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -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);
-- 
1.6.2.2





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/2] sctp: fix to reset packet information after packet
  2009-09-02  5:05 [PATCH 1/2] sctp: fix to reset packet information after packet transmit Wei Yongjun
@ 2009-09-02 14:41 ` Vlad Yasevich
  0 siblings, 0 replies; 2+ messages in thread
From: Vlad Yasevich @ 2009-09-02 14:41 UTC (permalink / raw)
  To: linux-sctp

Wei Yongjun wrote:
> 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.
> 
> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
> ---
>  net/sctp/output.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/net/sctp/output.c b/net/sctp/output.c
> index b94c211..fbbfbce 100644
> --- a/net/sctp/output.c
> +++ b/net/sctp/output.c
> @@ -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

>  	return err;
>  no_route:
>  	kfree_skb(nskb);


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-09-02 14:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-02  5:05 [PATCH 1/2] sctp: fix to reset packet information after packet transmit Wei Yongjun
2009-09-02 14:41 ` [PATCH 1/2] sctp: fix to reset packet information after packet Vlad Yasevich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).