Author: tuexen
Date: Tue Jun 16 08:21:58 2015
New Revision: 284438
URL: https://svnweb.freebsd.org/changeset/base/284438

Log:
  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.

Modified:
  stable/10/sys/netinet/sctp_output.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet/sctp_output.c
==============================================================================
--- stable/10/sys/netinet/sctp_output.c Tue Jun 16 03:03:26 2015        
(r284437)
+++ stable/10/sys/netinet/sctp_output.c Tue Jun 16 08:21:58 2015        
(r284438)
@@ -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) &&
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to