summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/netbsd-tap/Makefile28
-rw-r--r--net/netbsd-tap/files/if_tap.c14
2 files changed, 32 insertions, 10 deletions
diff --git a/net/netbsd-tap/Makefile b/net/netbsd-tap/Makefile
index 042462b116c..3fc1959a166 100644
--- a/net/netbsd-tap/Makefile
+++ b/net/netbsd-tap/Makefile
@@ -1,6 +1,28 @@
-# $NetBSD: Makefile,v 1.3 2005/02/20 21:50:57 cube Exp $
-
-DISTNAME= netbsd-tap-20050220
+# $NetBSD: Makefile,v 1.4 2005/03/24 22:39:07 cube Exp $
+
+# This package relies on a correct configuration of pkgsrc WRT NetBSD
+# source directory information, otherwise the build will fail in a non-
+# obvious way.
+#
+# If /usr/src doesn't point to your NetBSD source tree, then you should
+# (generally speaking, it covers more than pkgsrc) define the variable
+# named NETBSDSRCDIR to the place where that NetBSD source tree is.
+#
+# Setting NETBSDSRCDIR in mk.conf will do the right thing when, for
+# example, you compile a LKM by hand. However, it will not be
+# sufficient in pkgsrc, as the Makefiles of the packages are called
+# with MAKECONF=/dev/null in the environment by default, and therefore
+# won't pick up the value for NETBSDSRCDIR.
+#
+# So additionally you will have to define PKGMAKECONF in mk.conf, and
+# make it point to a mk.conf-like file that will contain your wished
+# NETBSDSRCDIR, COPTS, CPUFLAGS and friends value.
+#
+# It is perfectly acceptable to set PKGMAKECONF to /etc/mk.conf, but be
+# aware that it can lead to some confusion of pkgsrc, which is why
+# MAKECONF was set to /dev/null in the first place.
+
+DISTNAME= netbsd-tap-20050324
CATEGORIES= net
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/net/netbsd-tap/files/if_tap.c b/net/netbsd-tap/files/if_tap.c
index 8c3e5e859e9..086e0191b3d 100644
--- a/net/netbsd-tap/files/if_tap.c
+++ b/net/netbsd-tap/files/if_tap.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_tap.c,v 1.4 2005/02/27 10:39:52 cube Exp $ */
+/* $NetBSD: if_tap.c,v 1.5 2005/03/24 22:39:07 cube Exp $ */
/*
* Copyright (c) 2003, 2004 The NetBSD Foundation.
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.4 2005/02/27 10:39:52 cube Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.5 2005/03/24 22:39:07 cube Exp $");
#if defined(_KERNEL_OPT)
#include "bpfilter.h"
@@ -259,7 +259,7 @@ tap_attach(struct device *parent, struct device *self, void *aux)
struct tap_softc *sc = (struct tap_softc *)self;
struct ifnet *ifp;
u_int8_t enaddr[ETHER_ADDR_LEN] =
- { 0xf0, 0x0b, 0xa4, 0xff, 0xff, 0xff };
+ { 0xf2, 0x0b, 0xa4, 0xff, 0xff, 0xff };
char enaddrstr[18];
uint32_t ui;
int error;
@@ -331,7 +331,7 @@ tap_attach(struct device *parent, struct device *self, void *aux)
&node, CTLFLAG_READWRITE,
CTLTYPE_STRING, sc->sc_dev.dv_xname, NULL,
tap_sysctl_handler, 0, sc, 18,
- CTL_NET, PF_LINK, tap_node, sc->sc_dev.dv_unit, CTL_EOL)) != 0)
+ CTL_NET, AF_LINK, tap_node, sc->sc_dev.dv_unit, CTL_EOL)) != 0)
aprint_error("%s: sysctl_createv returned %d, ignoring\n",
sc->sc_dev.dv_xname, error);
@@ -384,7 +384,7 @@ tap_detach(struct device* self, int flags)
* sysctl_destroyv. One should be sure to always end the path with
* CTL_EOL.
*/
- if ((error = sysctl_destroyv(NULL, CTL_NET, PF_LINK, tap_node,
+ if ((error = sysctl_destroyv(NULL, CTL_NET, AF_LINK, tap_node,
sc->sc_dev.dv_unit, CTL_EOL)) != 0)
aprint_error("%s: sysctl_destroyv returned %d, ignoring\n",
sc->sc_dev.dv_xname, error);
@@ -1220,7 +1220,7 @@ SYSCTL_SETUP(sysctl_tap_setup, "sysctl net.link.tap subtree setup")
CTLFLAG_PERMANENT,
CTLTYPE_NODE, "link", NULL,
NULL, 0, NULL, 0,
- CTL_NET, PF_LINK, CTL_EOL)) != 0)
+ CTL_NET, AF_LINK, CTL_EOL)) != 0)
return;
/*
@@ -1240,7 +1240,7 @@ SYSCTL_SETUP(sysctl_tap_setup, "sysctl net.link.tap subtree setup")
CTLFLAG_PERMANENT,
CTLTYPE_NODE, "tap", NULL,
NULL, 0, NULL, 0,
- CTL_NET, PF_LINK, CTL_CREATE, CTL_EOL)) != 0)
+ CTL_NET, AF_LINK, CTL_CREATE, CTL_EOL)) != 0)
return;
tap_node = node->sysctl_num;
}