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
This commit is contained in:
Bjoern A. Zeeb 2012-01-22 02:16:31 +00:00
parent 83e521ec73
commit aa57e971bc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=230443
3 changed files with 16 additions and 9 deletions

View File

@ -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

View File

@ -1,13 +1,21 @@
# $FreeBSD$
.include <bsd.own.mk>
.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 <bsd.kmod.mk>

View File

@ -30,14 +30,12 @@
#include <sys/cdefs.h>
__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 <sys/param.h>
#include <sys/kernel.h>