summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2010-06-02 15:41:06 +0000
committerclaudio <claudio@openbsd.org>2010-06-02 15:41:06 +0000
commit9af8ccbc849cf6c9e2371d8de0419144a6359c15 (patch)
tree350d04e80425cbc2577acd5a34265b359c2cb617
parentfix rcs prefix (diff)
downloadwireguard-openbsd-9af8ccbc849cf6c9e2371d8de0419144a6359c15.tar.xz
wireguard-openbsd-9af8ccbc849cf6c9e2371d8de0419144a6359c15.zip
Kill the mpls enable sysctl knob. Since MPLS needs to be enabled explicitly
on each interface there is no need for yet another knob. OK michele@
-rw-r--r--sys/netmpls/mpls.h17
-rw-r--r--sys/netmpls/mpls_input.c4
-rw-r--r--sys/netmpls/mpls_output.c4
-rw-r--r--sys/netmpls/mpls_raw.c3
4 files changed, 13 insertions, 15 deletions
diff --git a/sys/netmpls/mpls.h b/sys/netmpls/mpls.h
index 991914eb8b3..4137c98ec60 100644
--- a/sys/netmpls/mpls.h
+++ b/sys/netmpls/mpls.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpls.h,v 1.22 2010/05/28 12:09:10 claudio Exp $ */
+/* $OpenBSD: mpls.h,v 1.23 2010/06/02 15:41:06 claudio Exp $ */
/*
* Copyright (C) 1999, 2000 and 2001 AYAME Project, WIDE Project.
@@ -122,23 +122,23 @@ struct rt_mpls {
#define MPLSCTL_MAXID 7
#define MPLSCTL_NAMES { \
- { 0, 0 }, \
- { "enable", CTLTYPE_INT }, \
+ { NULL, 0 }, \
+ { NULL, 0 }, \
{ "ttl", CTLTYPE_INT }, \
{ "ifq", CTLTYPE_NODE },\
{ "maxloop_inkernel", CTLTYPE_INT }, \
{ "mapttl_ip", CTLTYPE_INT }, \
- { "mapttl_ip6", CTLTYPE_INT }, \
+ { "mapttl_ip6", CTLTYPE_INT } \
}
#define MPLSCTL_VARS { \
- 0, \
- &mpls_enable, \
+ NULL, \
+ NULL, \
&mpls_defttl, \
- 0, \
+ NULL, \
&mpls_inkloop, \
&mpls_mapttl_ip, \
- &mpls_mapttl_ip6, \
+ &mpls_mapttl_ip6 \
}
#endif
@@ -167,7 +167,6 @@ extern int mpls_raw_usrreq(struct socket *, int, struct mbuf *,
extern struct ifqueue mplsintrq; /* MPLS input queue */
extern int mplsqmaxlen; /* MPLS input queue length */
-extern int mpls_enable;
extern int mpls_defttl;
void mpls_init(void);
diff --git a/sys/netmpls/mpls_input.c b/sys/netmpls/mpls_input.c
index 3715a00a95a..bdab232a85b 100644
--- a/sys/netmpls/mpls_input.c
+++ b/sys/netmpls/mpls_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpls_input.c,v 1.25 2010/05/31 15:31:01 claudio Exp $ */
+/* $OpenBSD: mpls_input.c,v 1.26 2010/06/02 15:41:07 claudio Exp $ */
/*
* Copyright (c) 2008 Claudio Jeker <claudio@openbsd.org>
@@ -95,7 +95,7 @@ mpls_input(struct mbuf *m)
u_int8_t ttl;
int i, hasbos;
- if (!mpls_enable || !ISSET(ifp->if_xflags, IFXF_MPLS)) {
+ if (!ISSET(ifp->if_xflags, IFXF_MPLS)) {
m_freem(m);
return;
}
diff --git a/sys/netmpls/mpls_output.c b/sys/netmpls/mpls_output.c
index 59f221aae1e..d7fabc5db8f 100644
--- a/sys/netmpls/mpls_output.c
+++ b/sys/netmpls/mpls_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpls_output.c,v 1.9 2010/05/28 12:09:10 claudio Exp $ */
+/* $OpenBSD: mpls_output.c,v 1.10 2010/06/02 15:41:07 claudio Exp $ */
/*
* Copyright (c) 2008 Claudio Jeker <claudio@openbsd.org>
@@ -53,7 +53,7 @@ mpls_output(struct ifnet *ifp0, struct mbuf *m, struct sockaddr *dst,
struct rt_mpls *rt_mpls;
int i, error;
- if (!mpls_enable || rt0 == NULL || (dst->sa_family != AF_INET &&
+ if (rt0 == NULL || (dst->sa_family != AF_INET &&
dst->sa_family != AF_INET6 && dst->sa_family != AF_MPLS)) {
if (!ISSET(ifp->if_xflags, IFXF_MPLS))
return (ifp->if_output(ifp, m, dst, rt));
diff --git a/sys/netmpls/mpls_raw.c b/sys/netmpls/mpls_raw.c
index 8a9675d7e4f..a00150c943c 100644
--- a/sys/netmpls/mpls_raw.c
+++ b/sys/netmpls/mpls_raw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpls_raw.c,v 1.5 2010/04/22 06:46:18 michele Exp $ */
+/* $OpenBSD: mpls_raw.c,v 1.6 2010/06/02 15:41:07 claudio Exp $ */
/*
* Copyright (C) 1999, 2000 and 2001 AYAME Project, WIDE Project.
@@ -54,7 +54,6 @@
u_long mpls_raw_sendspace = MPLS_RAW_SNDQ;
u_long mpls_raw_recvspace = MPLS_RAW_RCVQ;
-int mpls_enable = 0;
int mpls_defttl = 255;
int mpls_inkloop = 16;
int mpls_push_expnull_ip = 0;