Module Name:    src
Committed By:   nakayama
Date:           Fri Jan 19 12:31:28 UTC 2018

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

Log Message:
Fix inverted logic.


To generate a diff of this commit:
cvs rdiff -u -r1.256 -r1.257 src/sys/net/if_ethersubr.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/if_ethersubr.c
diff -u src/sys/net/if_ethersubr.c:1.256 src/sys/net/if_ethersubr.c:1.257
--- src/sys/net/if_ethersubr.c:1.256	Mon Jan 15 14:00:34 2018
+++ src/sys/net/if_ethersubr.c	Fri Jan 19 12:31:27 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ethersubr.c,v 1.256 2018/01/15 14:00:34 maxv Exp $	*/
+/*	$NetBSD: if_ethersubr.c,v 1.257 2018/01/19 12:31:27 nakayama Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.256 2018/01/15 14:00:34 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.257 2018/01/19 12:31:27 nakayama Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -756,7 +756,7 @@ ether_input(struct ifnet *ifp, struct mb
 	case ETHERTYPE_SLOWPROTOCOLS: {
 		uint8_t subtype;
 
-		KASSERTMSG((m->m_pkthdr.len < sizeof(*eh) + sizeof(subtype)),
+		KASSERTMSG((m->m_pkthdr.len >= sizeof(*eh) + sizeof(subtype)),
 			"too short slow protocol packet");
 
 		m_copydata(m, sizeof(*eh), sizeof(subtype), &subtype);

Reply via email to