diff options
Diffstat (limited to 'net/sctp/output.c')
-rw-r--r-- | net/sctp/output.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/net/sctp/output.c b/net/sctp/output.c index b801bc9fb639..1f9336177ee2 100644 --- a/net/sctp/output.c +++ b/net/sctp/output.c | |||
@@ -136,6 +136,17 @@ struct sctp_packet *sctp_packet_init(struct sctp_packet *packet, | |||
136 | return packet; | 136 | return packet; |
137 | } | 137 | } |
138 | 138 | ||
139 | static void sctp_packet_reset(struct sctp_packet *packet) | ||
140 | { | ||
141 | packet->size = packet->overhead; | ||
142 | packet->has_cookie_echo = 0; | ||
143 | packet->has_sack = 0; | ||
144 | packet->has_data = 0; | ||
145 | packet->has_auth = 0; | ||
146 | packet->ipfragok = 0; | ||
147 | packet->auth = NULL; | ||
148 | } | ||
149 | |||
139 | /* Free a packet. */ | 150 | /* Free a packet. */ |
140 | void sctp_packet_free(struct sctp_packet *packet) | 151 | void sctp_packet_free(struct sctp_packet *packet) |
141 | { | 152 | { |
@@ -576,7 +587,7 @@ int sctp_packet_transmit(struct sctp_packet *packet) | |||
576 | (*tp->af_specific->sctp_xmit)(nskb, tp); | 587 | (*tp->af_specific->sctp_xmit)(nskb, tp); |
577 | 588 | ||
578 | out: | 589 | out: |
579 | packet->size = packet->overhead; | 590 | sctp_packet_reset(packet); |
580 | return err; | 591 | return err; |
581 | no_route: | 592 | no_route: |
582 | kfree_skb(nskb); | 593 | kfree_skb(nskb); |