Module Name:    src
Committed By:   maxv
Date:           Sat Apr 28 14:39:34 UTC 2018

Modified Files:
        src/sys/netipsec: ipsec_mbuf.c ipsec_private.h

Log Message:
Inline M_EXT_WRITABLE directly, and remove the XXX, there's nothing wrong
in the use of !M_READONLY.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/netipsec/ipsec_mbuf.c
cvs rdiff -u -r1.7 -r1.8 src/sys/netipsec/ipsec_private.h

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

Modified files:

Index: src/sys/netipsec/ipsec_mbuf.c
diff -u src/sys/netipsec/ipsec_mbuf.c:1.26 src/sys/netipsec/ipsec_mbuf.c:1.27
--- src/sys/netipsec/ipsec_mbuf.c:1.26	Thu Apr 19 08:27:38 2018
+++ src/sys/netipsec/ipsec_mbuf.c	Sat Apr 28 14:39:34 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipsec_mbuf.c,v 1.26 2018/04/19 08:27:38 maxv Exp $	*/
+/*	$NetBSD: ipsec_mbuf.c,v 1.27 2018/04/28 14:39:34 maxv Exp $	*/
 
 /*
  * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipsec_mbuf.c,v 1.26 2018/04/19 08:27:38 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec_mbuf.c,v 1.27 2018/04/28 14:39:34 maxv Exp $");
 
 /*
  * IPsec-specific mbuf routines.
@@ -94,7 +94,7 @@ m_clone(struct mbuf *m0)
 		/*
 		 * Writable mbufs are left alone (for now).
 		 */
-		if (M_EXT_WRITABLE(m)) {
+		if (!M_READONLY(m)) {
 			mprev = m;
 			continue;
 		}

Index: src/sys/netipsec/ipsec_private.h
diff -u src/sys/netipsec/ipsec_private.h:1.7 src/sys/netipsec/ipsec_private.h:1.8
--- src/sys/netipsec/ipsec_private.h:1.7	Wed Feb 28 11:19:49 2018
+++ src/sys/netipsec/ipsec_private.h	Sat Apr 28 14:39:34 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipsec_private.h,v 1.7 2018/02/28 11:19:49 maxv Exp $	*/
+/*	$NetBSD: ipsec_private.h,v 1.8 2018/04/28 14:39:34 maxv Exp $	*/
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -69,9 +69,6 @@ extern percpu_t *pfkeystat_percpu;
  */
 #define IPSEC_SPLASSERT_SOFTNET(msg)	do {} while (0)
 
-/* XXX wrong, but close enough for restricted ipsec usage. */
-#define M_EXT_WRITABLE(m) (!M_READONLY(m))
-
 /* superuser opened socket? */
 #define IPSEC_PRIVILEGED_SO(so) ((so)->so_uidinfo->ui_uid == 0)
 

Reply via email to