summaryrefslogtreecommitdiffstats
path: root/sys/contrib
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2009-02-27 14:12:05 +0000
committerbz <bz@FreeBSD.org>2009-02-27 14:12:05 +0000
commitdf2be82cecfdcfe4fe66cafe9b35f2eb7121b532 (patch)
tree5eda124dfca0f61a8005b2cb09ebb3f08ba9fffc /sys/contrib
parent5e1ae496afc1fd82d22f3bc722cc32bf1a7e2524 (diff)
downloadFreeBSD-src-df2be82cecfdcfe4fe66cafe9b35f2eb7121b532.zip
FreeBSD-src-df2be82cecfdcfe4fe66cafe9b35f2eb7121b532.tar.gz
For all files including net/vnet.h directly include opt_route.h and
net/route.h. Remove the hidden include of opt_route.h and net/route.h from net/vnet.h. We need to make sure that both opt_route.h and net/route.h are included before net/vnet.h because of the way MRT figures out the number of FIBs from the kernel option. If we do not, we end up with the default number of 1 when including net/vnet.h and array sizes are wrong. This does not change the list of files which depend on opt_route.h but we can identify them now more easily.
Diffstat (limited to 'sys/contrib')
-rw-r--r--sys/contrib/altq/altq/altq_subr.c4
-rw-r--r--sys/contrib/pf/net/pf_if.c2
-rw-r--r--sys/contrib/pf/net/pf_ioctl.c8
3 files changed, 9 insertions, 5 deletions
diff --git a/sys/contrib/altq/altq/altq_subr.c b/sys/contrib/altq/altq/altq_subr.c
index 807a6c7..b2715ad 100644
--- a/sys/contrib/altq/altq/altq_subr.c
+++ b/sys/contrib/altq/altq/altq_subr.c
@@ -32,6 +32,7 @@
#include "opt_inet.h"
#ifdef __FreeBSD__
#include "opt_inet6.h"
+#include "opt_route.h"
#endif
#endif /* __FreeBSD__ || __NetBSD__ */
@@ -54,7 +55,10 @@
#include <net/if.h>
#include <net/if_dl.h>
#include <net/if_types.h>
+#ifdef __FreeBSD__
+#include <net/route.h>
#include <net/vnet.h>
+#endif
#include <netinet/in.h>
#include <netinet/in_systm.h>
diff --git a/sys/contrib/pf/net/pf_if.c b/sys/contrib/pf/net/pf_if.c
index 1972edc..31a4313 100644
--- a/sys/contrib/pf/net/pf_if.c
+++ b/sys/contrib/pf/net/pf_if.c
@@ -35,6 +35,7 @@
#if defined(__FreeBSD__)
#include "opt_inet.h"
#include "opt_inet6.h"
+#include "opt_route.h"
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -61,6 +62,7 @@ __FBSDID("$FreeBSD$");
#include <net/if.h>
#include <net/if_types.h>
#ifdef __FreeBSD__
+#include <net/route.h>
#include <net/vnet.h>
#endif
diff --git a/sys/contrib/pf/net/pf_ioctl.c b/sys/contrib/pf/net/pf_ioctl.c
index 6d509c5..e211c6a 100644
--- a/sys/contrib/pf/net/pf_ioctl.c
+++ b/sys/contrib/pf/net/pf_ioctl.c
@@ -36,14 +36,12 @@
*/
#ifdef __FreeBSD__
-#include "opt_inet.h"
-#include "opt_inet6.h"
-
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#endif
-#ifdef __FreeBSD__
+#include "opt_inet.h"
+#include "opt_inet6.h"
+#include "opt_route.h"
#include "opt_bpf.h"
#include "opt_pf.h"
OpenPOWER on IntegriCloud