Module Name:    src
Committed By:   maxv
Date:           Fri Apr 27 09:02:16 UTC 2018

Modified Files:
        src/sys/netinet6: icmp6.c

Log Message:
Fix a bug introduced in rev1.154 (2009). mcl_cache still has a size of
MCLBYTES, so the area allocated is still too small.

I think it should have been MEXTMALLOC, and of course I can't test my
change.


To generate a diff of this commit:
cvs rdiff -u -r1.232 -r1.233 src/sys/netinet6/icmp6.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/netinet6/icmp6.c
diff -u src/sys/netinet6/icmp6.c:1.232 src/sys/netinet6/icmp6.c:1.233
--- src/sys/netinet6/icmp6.c:1.232	Thu Apr 26 19:50:09 2018
+++ src/sys/netinet6/icmp6.c	Fri Apr 27 09:02:16 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: icmp6.c,v 1.232 2018/04/26 19:50:09 maxv Exp $	*/
+/*	$NetBSD: icmp6.c,v 1.233 2018/04/27 09:02:16 maxv Exp $	*/
 /*	$KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.232 2018/04/26 19:50:09 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.233 2018/04/27 09:02:16 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -2495,7 +2495,7 @@ icmp6_redirect_output(struct mbuf *m0, s
 	MGETHDR(m, M_DONTWAIT, MT_HEADER);
 	if (m && IPV6_MMTU >= MHLEN) {
 #if IPV6_MMTU >= MCLBYTES
-		_MCLGET(m, mcl_cache, IPV6_MMTU, M_DONTWAIT);
+		MEXTMALLOC(m, IPV6_MMTU, M_NOWAIT);
 #else
 		MCLGET(m, M_DONTWAIT);
 #endif

Reply via email to