[openssh-commits] [openssh] 02/02: stubs for rdomain replacement functions

git+noreply at mindrot.org git+noreply at mindrot.org
Wed Oct 25 13:23:02 AEDT 2017


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 6eee79f9b8d4a3b113b698383948a119acb82415
Author: Damien Miller <djm at mindrot.org>
Date:   Wed Oct 25 13:22:29 2017 +1100

    stubs for rdomain replacement functions
---
 openbsd-compat/port-net.c | 32 ++++++++++++++++++++++++++++++++
 openbsd-compat/port-net.h | 11 +++++++++++
 2 files changed, 43 insertions(+)

diff --git a/openbsd-compat/port-net.c b/openbsd-compat/port-net.c
index 0e75c911..d384b145 100644
--- a/openbsd-compat/port-net.c
+++ b/openbsd-compat/port-net.c
@@ -36,6 +36,38 @@
 #include "channels.h"
 #include "ssherr.h"
 
+/*
+ * This file contains various portability code for network support,
+ * including tun/tap forwarding and routing domains.
+ */
+
+#if defined(SYS_RDOMAIN_XXX)
+/* XXX examples */
+char *
+sys_get_rdomain(int fd)
+{
+	return NULL;
+}
+
+int
+sys_set_rdomain(int fd, const char *name)
+{
+	return -1;
+}
+
+int
+valid_rdomain(const char *name)
+{
+	return 0;
+}
+
+void
+sys_set_process_rdomain(const char *name)
+{
+	fatal("%s: not supported", __func__);
+}
+#endif /* defined(SYS_RDOMAIN_XXX) */
+
 /*
  * This is the portable version of the SSH tunnel forwarding, it
  * uses some preprocessor definitions for various platform-specific
diff --git a/openbsd-compat/port-net.h b/openbsd-compat/port-net.h
index 926bc93e..715e9fb3 100644
--- a/openbsd-compat/port-net.h
+++ b/openbsd-compat/port-net.h
@@ -31,4 +31,15 @@ int	 sys_tun_infilter(struct ssh *, struct Channel *, char *, int);
 u_char	*sys_tun_outfilter(struct ssh *, struct Channel *, u_char **, size_t *);
 #endif
 
+#if defined(SYS_RDOMAIN_XXX)
+# define HAVE_SYS_GET_RDOMAIN
+# define HAVE_SYS_SET_RDOMAIN
+# define HAVE_SYS_SET_PROCESS_RDOMAIN
+# define HAVE_SYS_VALID_RDOMAIN
+char *sys_get_rdomain(int fd);
+int sys_set_rdomain(int fd, const char *name);
+int valid_rdomain(const char *name);
+void sys_set_process_rdomain(const char *name);
+#endif
+
 #endif

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list