Module Name:    src
Committed By:   rin
Date:           Thu Dec 13 20:54:50 UTC 2018

Modified Files:
        src/sys/net: ether_sw_offload.c

Log Message:
Panic rather than silently dropping packets when TX offload options are
enabled for unsupported frame types.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/net/ether_sw_offload.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/net/ether_sw_offload.c
diff -u src/sys/net/ether_sw_offload.c:1.3 src/sys/net/ether_sw_offload.c:1.4
--- src/sys/net/ether_sw_offload.c:1.3	Thu Dec 13 20:44:33 2018
+++ src/sys/net/ether_sw_offload.c	Thu Dec 13 20:54:50 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ether_sw_offload.c,v 1.3 2018/12/13 20:44:33 rin Exp $	*/
+/*	$NetBSD: ether_sw_offload.c,v 1.4 2018/12/13 20:54:50 rin Exp $	*/
 
 /*
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ether_sw_offload.c,v 1.3 2018/12/13 20:44:33 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ether_sw_offload.c,v 1.4 2018/12/13 20:54:50 rin Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -99,7 +99,7 @@ ether_sw_offload_tx(struct ifnet *ifp, s
 		ehlen = ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN;
 		break;
 	default:
-		goto quit;
+		panic("%s: unexpected frame type", __func__);
 	}
 	KASSERT(m->m_pkthdr.len >= ehlen);
 
@@ -331,7 +331,6 @@ ether_sw_offload_rx(struct ifnet *ifp, s
 		break;
 	default:
 		panic("%s: impossible", __func__);
-		break;
 	}
 
 done:

Reply via email to