In case of an output error, continue with the next net, don't try to
continue sending on the same net. This fixes a bug where an invalid mbuf chain was constructed, if a full size frame of control chunks should be sent and there is a output error. Based on a discussion with rrs@, change move to the next net. This fixes the bug and improves the behaviour. Thanks to Irene Ruengeler for spending a lot of time in narrowing this problem down. MFC after: 3 days
This commit is contained in:
parent
5eb95e11ba
commit
a6a7d5cf0d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=284326
@ -7985,6 +7985,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp,
|
||||
} else {
|
||||
r_mtu = mtu;
|
||||
}
|
||||
error = 0;
|
||||
/************************/
|
||||
/* ASCONF transmission */
|
||||
/************************/
|
||||
@ -8143,7 +8144,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp,
|
||||
sctp_move_chunks_from_net(stcb, net);
|
||||
}
|
||||
*reason_code = 7;
|
||||
continue;
|
||||
break;
|
||||
} else
|
||||
asoc->ifp_had_enobuf = 0;
|
||||
if (*now_filled == 0) {
|
||||
@ -8186,6 +8187,10 @@ sctp_med_chunk_output(struct sctp_inpcb *inp,
|
||||
}
|
||||
}
|
||||
}
|
||||
if (error != 0) {
|
||||
/* try next net */
|
||||
continue;
|
||||
}
|
||||
/************************/
|
||||
/* Control transmission */
|
||||
/************************/
|
||||
@ -8420,7 +8425,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp,
|
||||
sctp_move_chunks_from_net(stcb, net);
|
||||
}
|
||||
*reason_code = 7;
|
||||
continue;
|
||||
break;
|
||||
} else
|
||||
asoc->ifp_had_enobuf = 0;
|
||||
/* Only HB or ASCONF advances time */
|
||||
@ -8466,6 +8471,10 @@ sctp_med_chunk_output(struct sctp_inpcb *inp,
|
||||
}
|
||||
}
|
||||
}
|
||||
if (error != 0) {
|
||||
/* try next net */
|
||||
continue;
|
||||
}
|
||||
/* JRI: if dest is in PF state, do not send data to it */
|
||||
if ((asoc->sctp_cmt_on_off > 0) &&
|
||||
(net != stcb->asoc.alternate) &&
|
||||
|
Loading…
Reference in New Issue
Block a user