From owner-svn-src-head@FreeBSD.ORG Sun Jan 22 02:16:32 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DEAC106566C; Sun, 22 Jan 2012 02:16:32 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 084B68FC12; Sun, 22 Jan 2012 02:16:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0M2GVL7019412; Sun, 22 Jan 2012 02:16:31 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0M2GVwT019408; Sun, 22 Jan 2012 02:16:31 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201201220216.q0M2GVwT019408@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 22 Jan 2012 02:16:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230443 - in head/sys: modules modules/ipdivert netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jan 2012 02:16:32 -0000 Author: bz Date: Sun Jan 22 02:16:31 2012 New Revision: 230443 URL: http://svn.freebsd.org/changeset/base/230443 Log: Fix ip_divert handling of inet and inet6 and module building some more. Properly sort the "carp" case in modules/Makefile after it was renamed. Reported by: bde (most) Reviewed by: bde MFC after: 3 days Modified: head/sys/modules/Makefile head/sys/modules/ipdivert/Makefile head/sys/netinet/ip_divert.c Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sun Jan 22 02:13:19 2012 (r230442) +++ head/sys/modules/Makefile Sun Jan 22 02:16:31 2012 (r230443) @@ -136,7 +136,7 @@ SUBDIR= ${_3dfx} \ ${_igb} \ ${_iir} \ ${_io} \ - ipdivert \ + ${_ipdivert} \ ${_ipfilter} \ ${_ipfw} \ ipfw_nat \ @@ -370,20 +370,21 @@ _random= random .endif .endif -.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES) -_if_gre= if_gre -.endif - .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \ defined(ALL_MODULES) _carp= carp .endif +.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES) +_if_gre= if_gre +.endif + .if ${MK_IPFILTER} != "no" || defined(ALL_MODULES) _ipfilter= ipfilter .endif .if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES) +_ipdivert= ipdivert _ipfw= ipfw .endif Modified: head/sys/modules/ipdivert/Makefile ============================================================================== --- head/sys/modules/ipdivert/Makefile Sun Jan 22 02:13:19 2012 (r230442) +++ head/sys/modules/ipdivert/Makefile Sun Jan 22 02:16:31 2012 (r230443) @@ -1,13 +1,21 @@ # $FreeBSD$ +.include + .PATH: ${.CURDIR}/../../netinet KMOD= ipdivert -SRCS= ip_divert.c opt_inet6.h +SRCS= ip_divert.c opt_inet.h opt_inet6.h .if !defined(KERNBUILDDIR) +.if ${MK_INET_SUPPORT} != "no" +opt_inet.h: + echo "#define INET 1" > ${.TARGET} +.endif +.if ${MK_INET6_SUPPORT} != "no" opt_inet6.h: echo "#define INET6 1" > ${.TARGET} .endif +.endif .include Modified: head/sys/netinet/ip_divert.c ============================================================================== --- head/sys/netinet/ip_divert.c Sun Jan 22 02:13:19 2012 (r230442) +++ head/sys/netinet/ip_divert.c Sun Jan 22 02:16:31 2012 (r230443) @@ -30,14 +30,12 @@ #include __FBSDID("$FreeBSD$"); -#if !defined(KLD_MODULE) #include "opt_inet.h" +#include "opt_inet6.h" #include "opt_sctp.h" #ifndef INET #error "IPDIVERT requires INET." #endif -#endif -#include "opt_inet6.h" #include #include