Module Name:    src
Committed By:   bouyer
Date:           Wed Sep 13 15:58:13 UTC 2023

Modified Files:
        src/sys/netinet: sctp_output.c

Log Message:
handle EHOSTDOWN the same way as EHOSTUNREACH in sctp_med_chunk_output().
Compile-tested only (I don't have a sctp setup); proposed in
http://mail-index.netbsd.org/tech-net/2023/09/11/msg008611.html
LGTM from Greg Troxel and Robert Swindells


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/netinet/sctp_output.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netinet/sctp_output.c
diff -u src/sys/netinet/sctp_output.c:1.33 src/sys/netinet/sctp_output.c:1.34
--- src/sys/netinet/sctp_output.c:1.33	Fri Nov  4 09:01:53 2022
+++ src/sys/netinet/sctp_output.c	Wed Sep 13 15:58:13 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: sctp_output.c,v 1.33 2022/11/04 09:01:53 ozaki-r Exp $ */
+/*	$NetBSD: sctp_output.c,v 1.34 2023/09/13 15:58:13 bouyer Exp $ */
 /*	$KAME: sctp_output.c,v 1.48 2005/06/16 18:29:24 jinmei Exp $	*/
 
 /*
@@ -30,7 +30,7 @@
  * SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sctp_output.c,v 1.33 2022/11/04 09:01:53 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sctp_output.c,v 1.34 2023/09/13 15:58:13 bouyer Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ipsec.h"
@@ -5643,7 +5643,8 @@ sctp_med_chunk_output(struct sctp_inpcb 
 							}
 							hbflag = 0;
 						}
-						if (error == EHOSTUNREACH) {
+						if (error == EHOSTUNREACH ||
+						    error == EHOSTDOWN) {
 							/*
 							 * Destination went
 							 * unreachable during
@@ -5921,7 +5922,8 @@ sctp_med_chunk_output(struct sctp_inpcb 
 					}
 					hbflag = 0;
 				}
-				if (error == EHOSTUNREACH) {
+				if (error == EHOSTUNREACH ||
+				    error == EHOSTDOWN) {
 					/*
 					 * Destination went unreachable during
 					 * this send

Reply via email to