Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netipsec Inline M_EXT_WRITABLE directly, an...



details:   https://anonhg.NetBSD.org/src/rev/ff066f07ea15
branches:  trunk
changeset: 318536:ff066f07ea15
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sat Apr 28 14:39:34 2018 +0000
description:
Inline M_EXT_WRITABLE directly, and remove the XXX, there's nothing wrong
in the use of !M_READONLY.

diffstat:

 sys/netipsec/ipsec_mbuf.c    |  6 +++---
 sys/netipsec/ipsec_private.h |  5 +----
 2 files changed, 4 insertions(+), 7 deletions(-)

diffs (46 lines):

diff -r 79b27b930bd3 -r ff066f07ea15 sys/netipsec/ipsec_mbuf.c
--- a/sys/netipsec/ipsec_mbuf.c Sat Apr 28 14:25:56 2018 +0000
+++ b/sys/netipsec/ipsec_mbuf.c Sat Apr 28 14:39:34 2018 +0000
@@ -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 @@
                /*
                 * Writable mbufs are left alone (for now).
                 */
-               if (M_EXT_WRITABLE(m)) {
+               if (!M_READONLY(m)) {
                        mprev = m;
                        continue;
                }
diff -r 79b27b930bd3 -r ff066f07ea15 sys/netipsec/ipsec_private.h
--- a/sys/netipsec/ipsec_private.h      Sat Apr 28 14:25:56 2018 +0000
+++ b/sys/netipsec/ipsec_private.h      Sat Apr 28 14:39:34 2018 +0000
@@ -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 @@
  */
 #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)
 



Home | Main Index | Thread Index | Old Index