diff options
Diffstat (limited to 'net/sctp/sm_statefuns.c')
-rw-r--r-- | net/sctp/sm_statefuns.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index a6a0ea71ae93..1c4e5d6c29c0 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c | |||
@@ -1123,19 +1123,17 @@ sctp_disposition_t sctp_sf_backbeat_8_3(const struct sctp_endpoint *ep, | |||
1123 | if (from_addr.sa.sa_family == AF_INET6) { | 1123 | if (from_addr.sa.sa_family == AF_INET6) { |
1124 | if (net_ratelimit()) | 1124 | if (net_ratelimit()) |
1125 | printk(KERN_WARNING | 1125 | printk(KERN_WARNING |
1126 | "%s association %p could not find address " | 1126 | "%s association %p could not find address %pI6\n", |
1127 | NIP6_FMT "\n", | ||
1128 | __func__, | 1127 | __func__, |
1129 | asoc, | 1128 | asoc, |
1130 | NIP6(from_addr.v6.sin6_addr)); | 1129 | &from_addr.v6.sin6_addr); |
1131 | } else { | 1130 | } else { |
1132 | if (net_ratelimit()) | 1131 | if (net_ratelimit()) |
1133 | printk(KERN_WARNING | 1132 | printk(KERN_WARNING |
1134 | "%s association %p could not find address " | 1133 | "%s association %p could not find address %pI4\n", |
1135 | NIPQUAD_FMT "\n", | ||
1136 | __func__, | 1134 | __func__, |
1137 | asoc, | 1135 | asoc, |
1138 | NIPQUAD(from_addr.v4.sin_addr.s_addr)); | 1136 | &from_addr.v4.sin_addr.s_addr); |
1139 | } | 1137 | } |
1140 | return SCTP_DISPOSITION_DISCARD; | 1138 | return SCTP_DISPOSITION_DISCARD; |
1141 | } | 1139 | } |
@@ -3691,6 +3689,7 @@ sctp_disposition_t sctp_sf_eat_fwd_tsn(const struct sctp_endpoint *ep, | |||
3691 | { | 3689 | { |
3692 | struct sctp_chunk *chunk = arg; | 3690 | struct sctp_chunk *chunk = arg; |
3693 | struct sctp_fwdtsn_hdr *fwdtsn_hdr; | 3691 | struct sctp_fwdtsn_hdr *fwdtsn_hdr; |
3692 | struct sctp_fwdtsn_skip *skip; | ||
3694 | __u16 len; | 3693 | __u16 len; |
3695 | __u32 tsn; | 3694 | __u32 tsn; |
3696 | 3695 | ||
@@ -3720,6 +3719,12 @@ sctp_disposition_t sctp_sf_eat_fwd_tsn(const struct sctp_endpoint *ep, | |||
3720 | if (sctp_tsnmap_check(&asoc->peer.tsn_map, tsn) < 0) | 3719 | if (sctp_tsnmap_check(&asoc->peer.tsn_map, tsn) < 0) |
3721 | goto discard_noforce; | 3720 | goto discard_noforce; |
3722 | 3721 | ||
3722 | /* Silently discard the chunk if stream-id is not valid */ | ||
3723 | sctp_walk_fwdtsn(skip, chunk) { | ||
3724 | if (ntohs(skip->stream) >= asoc->c.sinit_max_instreams) | ||
3725 | goto discard_noforce; | ||
3726 | } | ||
3727 | |||
3723 | sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_FWDTSN, SCTP_U32(tsn)); | 3728 | sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_FWDTSN, SCTP_U32(tsn)); |
3724 | if (len > sizeof(struct sctp_fwdtsn_hdr)) | 3729 | if (len > sizeof(struct sctp_fwdtsn_hdr)) |
3725 | sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_FWDTSN, | 3730 | sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_FWDTSN, |
@@ -3751,6 +3756,7 @@ sctp_disposition_t sctp_sf_eat_fwd_tsn_fast( | |||
3751 | { | 3756 | { |
3752 | struct sctp_chunk *chunk = arg; | 3757 | struct sctp_chunk *chunk = arg; |
3753 | struct sctp_fwdtsn_hdr *fwdtsn_hdr; | 3758 | struct sctp_fwdtsn_hdr *fwdtsn_hdr; |
3759 | struct sctp_fwdtsn_skip *skip; | ||
3754 | __u16 len; | 3760 | __u16 len; |
3755 | __u32 tsn; | 3761 | __u32 tsn; |
3756 | 3762 | ||
@@ -3780,6 +3786,12 @@ sctp_disposition_t sctp_sf_eat_fwd_tsn_fast( | |||
3780 | if (sctp_tsnmap_check(&asoc->peer.tsn_map, tsn) < 0) | 3786 | if (sctp_tsnmap_check(&asoc->peer.tsn_map, tsn) < 0) |
3781 | goto gen_shutdown; | 3787 | goto gen_shutdown; |
3782 | 3788 | ||
3789 | /* Silently discard the chunk if stream-id is not valid */ | ||
3790 | sctp_walk_fwdtsn(skip, chunk) { | ||
3791 | if (ntohs(skip->stream) >= asoc->c.sinit_max_instreams) | ||
3792 | goto gen_shutdown; | ||
3793 | } | ||
3794 | |||
3783 | sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_FWDTSN, SCTP_U32(tsn)); | 3795 | sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_FWDTSN, SCTP_U32(tsn)); |
3784 | if (len > sizeof(struct sctp_fwdtsn_hdr)) | 3796 | if (len > sizeof(struct sctp_fwdtsn_hdr)) |
3785 | sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_FWDTSN, | 3797 | sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_FWDTSN, |