diff options
author | tuexen <tuexen@FreeBSD.org> | 2015-06-16 08:21:58 +0000 |
---|---|---|
committer | tuexen <tuexen@FreeBSD.org> | 2015-06-16 08:21:58 +0000 |
commit | 74eb0793792ad11f24238528c05979070b410a24 (patch) | |
tree | c939c1bee6f8e4e56c4fa7f6722a33f6a78b7b44 /sys/netinet | |
parent | 1d2632e58b4f9b2c6256c2da8cefdd3574d81cde (diff) | |
download | FreeBSD-src-74eb0793792ad11f24238528c05979070b410a24.zip FreeBSD-src-74eb0793792ad11f24238528c05979070b410a24.tar.gz |
MFC r284326:
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.
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/sctp_output.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index 3531c63..e147de1 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -8001,6 +8001,7 @@ again_one_more_time: } else { r_mtu = mtu; } + error = 0; /************************/ /* ASCONF transmission */ /************************/ @@ -8159,7 +8160,7 @@ again_one_more_time: sctp_move_chunks_from_net(stcb, net); } *reason_code = 7; - continue; + break; } else asoc->ifp_had_enobuf = 0; if (*now_filled == 0) { @@ -8202,6 +8203,10 @@ again_one_more_time: } } } + if (error != 0) { + /* try next net */ + continue; + } /************************/ /* Control transmission */ /************************/ @@ -8436,7 +8441,7 @@ again_one_more_time: sctp_move_chunks_from_net(stcb, net); } *reason_code = 7; - continue; + break; } else asoc->ifp_had_enobuf = 0; /* Only HB or ASCONF advances time */ @@ -8482,6 +8487,10 @@ again_one_more_time: } } } + 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) && |