summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2010-06-02 16:01:42 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2010-06-02 16:01:42 +0000
commit7506a99adac8ba760239e941a4ed33832b15643b (patch)
tree56a4f6557c898049f7a470a3a38c6d6bd1a81bb4
parentc1301837e218f861283716234762918aba6ec12e (diff)
MPLSCTL_ENABLE is gone, no need to check for it. There is also no real
reason why ldpd needs to check for ip forwarding so remove that check as well. Reminded by phessler@
-rw-r--r--usr.sbin/ldpd/ldpd.c27
1 files changed, 1 insertions, 26 deletions
diff --git a/usr.sbin/ldpd/ldpd.c b/usr.sbin/ldpd/ldpd.c
index bca79578bb6..161244cd640 100644
--- a/usr.sbin/ldpd/ldpd.c
+++ b/usr.sbin/ldpd/ldpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldpd.c,v 1.8 2010/05/26 13:56:07 nicm Exp $ */
+/* $OpenBSD: ldpd.c,v 1.9 2010/06/02 16:01:41 claudio Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -25,7 +25,6 @@
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/param.h>
-#include <sys/sysctl.h>
#include <netinet/in.h>
#include <arpa/inet.h>
@@ -130,9 +129,6 @@ main(int argc, char *argv[])
struct event ev_sigint, ev_sigterm, ev_sigchld, ev_sighup;
int ch, opts = 0;
int debug = 0;
- int ipforwarding, mplsenable;
- int mib[4];
- size_t len;
conffile = CONF_FILE;
ldpd_process = PROC_MAIN;
@@ -167,27 +163,6 @@ main(int argc, char *argv[])
}
}
- mib[0] = CTL_NET;
- mib[1] = PF_INET;
- mib[2] = IPPROTO_IP;
- mib[3] = IPCTL_FORWARDING;
- len = sizeof(ipforwarding);
- if (sysctl(mib, 4, &ipforwarding, &len, NULL, 0) == -1)
- err(1, "sysctl");
-
- if (ipforwarding != 1)
- log_warnx("WARNING: IP forwarding NOT enabled");
-
- mib[0] = CTL_NET;
- mib[1] = PF_MPLS;
- mib[2] = MPLSCTL_ENABLE;
- len = sizeof(mplsenable);
- if (sysctl(mib, 3, &mplsenable, &len, NULL, 0) == -1)
- err(1, "sysctl");
-
- if (mplsenable != 1)
- log_warnx("WARNING: MPLS NOT enabled");
-
/* fetch interfaces early */
kif_init();