diff options
Diffstat (limited to 'net/sctp/output.c')
-rw-r--r-- | net/sctp/output.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/net/sctp/output.c b/net/sctp/output.c index 0fb140f8f088..0f4d15fc2627 100644 --- a/net/sctp/output.c +++ b/net/sctp/output.c | |||
@@ -20,9 +20,8 @@ | |||
20 | * See the GNU General Public License for more details. | 20 | * See the GNU General Public License for more details. |
21 | * | 21 | * |
22 | * You should have received a copy of the GNU General Public License | 22 | * You should have received a copy of the GNU General Public License |
23 | * along with GNU CC; see the file COPYING. If not, write to | 23 | * along with GNU CC; see the file COPYING. If not, see |
24 | * the Free Software Foundation, 59 Temple Place - Suite 330, | 24 | * <http://www.gnu.org/licenses/>. |
25 | * Boston, MA 02111-1307, USA. | ||
26 | * | 25 | * |
27 | * Please send any bug reports or fixes you make to the | 26 | * Please send any bug reports or fixes you make to the |
28 | * email address(es): | 27 | * email address(es): |
@@ -281,7 +280,7 @@ static sctp_xmit_t __sctp_packet_append_chunk(struct sctp_packet *packet, | |||
281 | 280 | ||
282 | /* We believe that this chunk is OK to add to the packet */ | 281 | /* We believe that this chunk is OK to add to the packet */ |
283 | switch (chunk->chunk_hdr->type) { | 282 | switch (chunk->chunk_hdr->type) { |
284 | case SCTP_CID_DATA: | 283 | case SCTP_CID_DATA: |
285 | /* Account for the data being in the packet */ | 284 | /* Account for the data being in the packet */ |
286 | sctp_packet_append_data(packet, chunk); | 285 | sctp_packet_append_data(packet, chunk); |
287 | /* Disallow SACK bundling after DATA. */ | 286 | /* Disallow SACK bundling after DATA. */ |
@@ -293,17 +292,17 @@ static sctp_xmit_t __sctp_packet_append_chunk(struct sctp_packet *packet, | |||
293 | /* timestamp the chunk for rtx purposes */ | 292 | /* timestamp the chunk for rtx purposes */ |
294 | chunk->sent_at = jiffies; | 293 | chunk->sent_at = jiffies; |
295 | break; | 294 | break; |
296 | case SCTP_CID_COOKIE_ECHO: | 295 | case SCTP_CID_COOKIE_ECHO: |
297 | packet->has_cookie_echo = 1; | 296 | packet->has_cookie_echo = 1; |
298 | break; | 297 | break; |
299 | 298 | ||
300 | case SCTP_CID_SACK: | 299 | case SCTP_CID_SACK: |
301 | packet->has_sack = 1; | 300 | packet->has_sack = 1; |
302 | if (chunk->asoc) | 301 | if (chunk->asoc) |
303 | chunk->asoc->stats.osacks++; | 302 | chunk->asoc->stats.osacks++; |
304 | break; | 303 | break; |
305 | 304 | ||
306 | case SCTP_CID_AUTH: | 305 | case SCTP_CID_AUTH: |
307 | packet->has_auth = 1; | 306 | packet->has_auth = 1; |
308 | packet->auth = chunk; | 307 | packet->auth = chunk; |
309 | break; | 308 | break; |
@@ -388,7 +387,7 @@ int sctp_packet_transmit(struct sctp_packet *packet) | |||
388 | int err = 0; | 387 | int err = 0; |
389 | int padding; /* How much padding do we need? */ | 388 | int padding; /* How much padding do we need? */ |
390 | __u8 has_data = 0; | 389 | __u8 has_data = 0; |
391 | struct dst_entry *dst = tp->dst; | 390 | struct dst_entry *dst; |
392 | unsigned char *auth = NULL; /* pointer to auth in skb data */ | 391 | unsigned char *auth = NULL; /* pointer to auth in skb data */ |
393 | 392 | ||
394 | pr_debug("%s: packet:%p\n", __func__, packet); | 393 | pr_debug("%s: packet:%p\n", __func__, packet); |
@@ -421,9 +420,9 @@ int sctp_packet_transmit(struct sctp_packet *packet) | |||
421 | } | 420 | } |
422 | } | 421 | } |
423 | dst = dst_clone(tp->dst); | 422 | dst = dst_clone(tp->dst); |
424 | skb_dst_set(nskb, dst); | ||
425 | if (!dst) | 423 | if (!dst) |
426 | goto no_route; | 424 | goto no_route; |
425 | skb_dst_set(nskb, dst); | ||
427 | 426 | ||
428 | /* Build the SCTP header. */ | 427 | /* Build the SCTP header. */ |
429 | sh = (struct sctphdr *)skb_push(nskb, sizeof(struct sctphdr)); | 428 | sh = (struct sctphdr *)skb_push(nskb, sizeof(struct sctphdr)); |
@@ -541,8 +540,7 @@ int sctp_packet_transmit(struct sctp_packet *packet) | |||
541 | } else { | 540 | } else { |
542 | /* no need to seed pseudo checksum for SCTP */ | 541 | /* no need to seed pseudo checksum for SCTP */ |
543 | nskb->ip_summed = CHECKSUM_PARTIAL; | 542 | nskb->ip_summed = CHECKSUM_PARTIAL; |
544 | nskb->csum_start = (skb_transport_header(nskb) - | 543 | nskb->csum_start = skb_transport_header(nskb) - nskb->head; |
545 | nskb->head); | ||
546 | nskb->csum_offset = offsetof(struct sctphdr, checksum); | 544 | nskb->csum_offset = offsetof(struct sctphdr, checksum); |
547 | } | 545 | } |
548 | } | 546 | } |
@@ -559,7 +557,7 @@ int sctp_packet_transmit(struct sctp_packet *packet) | |||
559 | * Note: The works for IPv6 layer checks this bit too later | 557 | * Note: The works for IPv6 layer checks this bit too later |
560 | * in transmission. See IP6_ECN_flow_xmit(). | 558 | * in transmission. See IP6_ECN_flow_xmit(). |
561 | */ | 559 | */ |
562 | (*tp->af_specific->ecn_capable)(nskb->sk); | 560 | tp->af_specific->ecn_capable(nskb->sk); |
563 | 561 | ||
564 | /* Set up the IP options. */ | 562 | /* Set up the IP options. */ |
565 | /* BUG: not implemented | 563 | /* BUG: not implemented |
@@ -594,7 +592,7 @@ int sctp_packet_transmit(struct sctp_packet *packet) | |||
594 | pr_debug("***sctp_transmit_packet*** skb->len:%d\n", nskb->len); | 592 | pr_debug("***sctp_transmit_packet*** skb->len:%d\n", nskb->len); |
595 | 593 | ||
596 | nskb->local_df = packet->ipfragok; | 594 | nskb->local_df = packet->ipfragok; |
597 | (*tp->af_specific->sctp_xmit)(nskb, tp); | 595 | tp->af_specific->sctp_xmit(nskb, tp); |
598 | 596 | ||
599 | out: | 597 | out: |
600 | sctp_packet_reset(packet); | 598 | sctp_packet_reset(packet); |