summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_domain.c
diff options
context:
space:
mode:
authornorby <norby@openbsd.org>2008-04-23 10:55:13 +0000
committernorby <norby@openbsd.org>2008-04-23 10:55:13 +0000
commitd90b97932db4c717a48c7a0c40086a10f5d28a61 (patch)
tree7009c8b31c7ad89646a29be9367e32eae69f4114 /sys/kern/uipc_domain.c
parentsync (diff)
downloadwireguard-openbsd-d90b97932db4c717a48c7a0c40086a10f5d28a61.tar.xz
wireguard-openbsd-d90b97932db4c717a48c7a0c40086a10f5d28a61.zip
Import MPLS (Multi Protocol Label Switching)
MPLS support partly based on the (abandoned?) AYAME project. Basic LSR (Label Switch Router) functionality is present, but not fully functional yet. It is currently possible to insert entries in the LIB (Label Information Base) with route(8), but setting the operation type is not supported yet. Imported to allow more people to work on this in the coming weeks. ok claudio@ laurent@ dlg@
Diffstat (limited to 'sys/kern/uipc_domain.c')
-rw-r--r--sys/kern/uipc_domain.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/kern/uipc_domain.c b/sys/kern/uipc_domain.c
index e2bcfcc5320..c991d601566 100644
--- a/sys/kern/uipc_domain.c
+++ b/sys/kern/uipc_domain.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_domain.c,v 1.26 2007/06/06 10:04:36 henning Exp $ */
+/* $OpenBSD: uipc_domain.c,v 1.27 2008/04/23 10:55:14 norby Exp $ */
/* $NetBSD: uipc_domain.c,v 1.14 1996/02/09 19:00:44 christos Exp $ */
/*
@@ -91,6 +91,9 @@ domaininit(void)
#ifdef NETATALK
ADDDOMAIN(atalk);
#endif
+#ifdef MPLS
+ ADDDOMAIN(mpls);
+#endif
#ifdef NATM
ADDDOMAIN(natm);
#endif
@@ -202,6 +205,13 @@ net_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
dp = pffinddomain(family);
if (dp == NULL)
return (ENOPROTOOPT);
+#ifdef MPLS
+ /* XXX WARNING: big fat ugly hack */
+ /* stupid net.mpls is special as it does not have a protocol */
+ if (family == PF_MPLS)
+ return (dp->dom_protosw[0].pr_sysctl(name + 1, namelen - 1,
+ oldp, oldlenp, newp, newlen));
+#endif
if (namelen < 3)
return (EISDIR); /* overloaded */