Source-Changes-HG archive

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

[src/netbsd-8]: src Pull up following revision(s) (requested by pgoyette in t...



details:   https://anonhg.NetBSD.org/src/rev/0f71666feb5a
branches:  netbsd-8
changeset: 434492:0f71666feb5a
user:      snj <snj%NetBSD.org@localhost>
date:      Thu Dec 21 19:14:41 2017 +0000

description:
Pull up following revision(s) (requested by pgoyette in ticket #436):
        distrib/sets/lists/modules/mi: revision 1.112
        sys/modules/Makefile: revision 1.196
        sys/modules/ip_ecn/Makefile: revision 1.1
        sys/modules/if_gif/Makefile: revision 1.3
        sys/net/if_gif.c: revision 1.136
        sys/netinet/ip_ecn.c: revision 1.17
Split ip_ecn code into its own module, so it can be shared between
gif(4), stf(4), and ipsec(4).  Without this, loading the if_gif
module can result in redefined global symbols if either ipsec(4) or
stf(4) but not gif(4) is built into the kernel.
Fixes PR kern/52795 (as reported by martin@ via irc).

diffstat:

 distrib/sets/lists/modules/mi |   4 +++-
 sys/modules/Makefile          |   3 ++-
 sys/modules/if_gif/Makefile   |   4 ++--
 sys/modules/ip_ecn/Makefile   |  13 +++++++++++++
 sys/net/if_gif.c              |   6 +++---
 sys/netinet/ip_ecn.c          |  22 ++++++++++++++++++++--
 6 files changed, 43 insertions(+), 9 deletions(-)

diffs (141 lines):

diff -r 1bd63527d7ec -r 0f71666feb5a distrib/sets/lists/modules/mi
--- a/distrib/sets/lists/modules/mi     Thu Dec 21 19:11:21 2017 +0000
+++ b/distrib/sets/lists/modules/mi     Thu Dec 21 19:14:41 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.110 2017/06/01 09:59:13 pgoyette Exp $
+# $NetBSD: mi,v 1.110.2.1 2017/12/21 19:14:41 snj Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -182,6 +182,8 @@
 ./@MODULEDIR@/if_vlan/if_vlan.kmod             base-kernel-modules     kmod
 ./@MODULEDIR@/iic                              base-kernel-modules     kmod
 ./@MODULEDIR@/iic/iic.kmod                     base-kernel-modules     kmod
+./@MODULEDIR@/ip_ecn                           base-kernel-modules     kmod
+./@MODULEDIR@/ip_ecn/ip_ecn.kmod               base-kernel-modules     kmod
 ./@MODULEDIR@/ipl                              base-kernel-modules     kmod
 ./@MODULEDIR@/ipl/ipl.kmod                     base-kernel-modules     kmod
 ./@MODULEDIR@/iscsi                            base-kernel-modules     kmod,iscsi
diff -r 1bd63527d7ec -r 0f71666feb5a sys/modules/Makefile
--- a/sys/modules/Makefile      Thu Dec 21 19:11:21 2017 +0000
+++ b/sys/modules/Makefile      Thu Dec 21 19:14:41 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.192 2017/06/01 09:58:27 pgoyette Exp $
+#      $NetBSD: Makefile,v 1.192.2.1 2017/12/21 19:14:41 snj Exp $
 
 .include <bsd.own.mk>
 
@@ -70,6 +70,7 @@
 SUBDIR+=       if_tun tun
 SUBDIR+=       if_vlan
 SUBDIR+=       iic
+SUBDIR+=       ip_ecn
 SUBDIR+=       ipl
 SUBDIR+=       kernfs
 SUBDIR+=       layerfs
diff -r 1bd63527d7ec -r 0f71666feb5a sys/modules/if_gif/Makefile
--- a/sys/modules/if_gif/Makefile       Thu Dec 21 19:11:21 2017 +0000
+++ b/sys/modules/if_gif/Makefile       Thu Dec 21 19:14:41 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2016/08/18 11:41:58 knakahara Exp $
+# $NetBSD: Makefile,v 1.2.12.1 2017/12/21 19:14:41 snj Exp $
 
 .include "../Makefile.inc"
 
@@ -6,7 +6,7 @@
 
 KMOD=          if_gif
 IOCONF=                gif.ioconf
-SRCS=          if_gif.c in_gif.c in6_gif.c ip_ecn.c
+SRCS=          if_gif.c in_gif.c in6_gif.c
 
 CPPFLAGS+=     -DINET
 CPPFLAGS+=     -DINET6
diff -r 1bd63527d7ec -r 0f71666feb5a sys/modules/ip_ecn/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/modules/ip_ecn/Makefile       Thu Dec 21 19:14:41 2017 +0000
@@ -0,0 +1,13 @@
+#      $NetBSD: Makefile,v 1.1.2.2 2017/12/21 19:14:41 snj Exp $
+
+.include "../Makefile.inc"
+
+.PATH: ${S}/netinet
+
+KMOD=  ip_ecn
+SRCS=  ip_ecn.c
+
+CPPFLAGS+=     -DINET
+CPPFLAGS+=     -DINET6
+
+.include <bsd.kmodule.mk>
diff -r 1bd63527d7ec -r 0f71666feb5a sys/net/if_gif.c
--- a/sys/net/if_gif.c  Thu Dec 21 19:11:21 2017 +0000
+++ b/sys/net/if_gif.c  Thu Dec 21 19:14:41 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_gif.c,v 1.126.2.4 2017/12/10 10:10:25 snj Exp $     */
+/*     $NetBSD: if_gif.c,v 1.126.2.5 2017/12/21 19:14:41 snj Exp $     */
 /*     $KAME: if_gif.c,v 1.76 2001/08/20 02:01:02 kjc Exp $    */
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.126.2.4 2017/12/10 10:10:25 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.126.2.5 2017/12/21 19:14:41 snj Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1144,4 +1144,4 @@
  */
 #include "if_module.h"
 
-IF_MODULE(MODULE_CLASS_DRIVER, gif, "")
+IF_MODULE(MODULE_CLASS_DRIVER, gif, "ip_ecn")
diff -r 1bd63527d7ec -r 0f71666feb5a sys/netinet/ip_ecn.c
--- a/sys/netinet/ip_ecn.c      Thu Dec 21 19:11:21 2017 +0000
+++ b/sys/netinet/ip_ecn.c      Thu Dec 21 19:14:41 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_ecn.c,v 1.16 2015/08/24 22:21:26 pooka Exp $        */
+/*     $NetBSD: ip_ecn.c,v 1.16.10.1 2017/12/21 19:14:41 snj Exp $     */
 /*     $KAME: ip_ecn.c,v 1.11 2001/05/03 16:09:29 itojun Exp $ */
 
 /*
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_ecn.c,v 1.16 2015/08/24 22:21:26 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_ecn.c,v 1.16.10.1 2017/12/21 19:14:41 snj Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -47,6 +47,7 @@
 #include <sys/malloc.h>
 #include <sys/mbuf.h>
 #include <sys/errno.h>
+#include <sys/module.h>
 
 #include <netinet/in.h>
 #include <netinet/in_systm.h>
@@ -130,3 +131,20 @@
        *inner |= htonl((u_int32_t)inner8 << 20);
 }
 #endif
+
+MODULE(MODULE_CLASS_MISC, ip_ecn, NULL);
+
+static int
+ip_ecn_modcmd(modcmd_t cmd, void *arg)
+{
+ 
+       switch (cmd) {
+       case MODULE_CMD_INIT:
+       case MODULE_CMD_FINI:
+               return 0;
+ 
+       default:
+               return ENOTTY;
+        }
+}
+



Home | Main Index | Thread Index | Old Index