summaryrefslogtreecommitdiffstats
path: root/misc.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2010-01-10 10:31:12 +1100
committerDarren Tucker <dtucker@zip.com.au>2010-01-10 10:31:12 +1100
commit7bd98e7f74ebd8bd32157b607acedcb68201b7de (patch)
treeb62a62fcc4def0b22e48f6dde5e414a77e4d2244 /misc.c
parent8c65f646a93ed2f61da65ba0ecf65a99bd585b79 (diff)
- dtucker@cvs.openbsd.org 2010/01/09 23:04:13
[channels.c ssh.1 servconf.c sshd_config.5 sshd.c channels.h servconf.h ssh-keyscan.1 ssh-keyscan.c readconf.c sshconnect.c misc.c ssh.c readconf.h scp.1 sftp.1 ssh_config.5 misc.h] Remove RoutingDomain from ssh since it's now not needed. It can be replaced with "route exec" or "nc -V" as a proxycommand. "route exec" also ensures that trafic such as DNS lookups stays withing the specified routingdomain. For example (from reyk): # route -T 2 exec /usr/sbin/sshd or inherited from the parent process $ route -T 2 exec sh $ ssh 10.1.2.3 ok deraadt@ markus@ stevesk@ reyk@
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c51
1 files changed, 1 insertions, 50 deletions
diff --git a/misc.c b/misc.c
index 550b03ca..e1f72312 100644
--- a/misc.c
+++ b/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.74 2009/12/25 19:40:21 stevesk Exp $ */
+/* $OpenBSD: misc.c,v 1.75 2010/01/09 23:04:13 dtucker Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
* Copyright (c) 2005,2006 Damien Miller. All rights reserved.
@@ -151,43 +151,6 @@ set_nodelay(int fd)
error("setsockopt TCP_NODELAY: %.100s", strerror(errno));
}
-/* open a socket in the specified routing domain */
-int
-socket_rdomain(int domain, int type, int protocol, int rdomain)
-{
- int sock, ipproto = IPPROTO_IP;
-
- if ((sock = socket(domain, type, protocol)) == -1)
- return (-1);
-
- if (rdomain == -1)
- return (sock);
-
- switch (domain) {
- case AF_INET6:
- ipproto = IPPROTO_IPV6;
- /* FALLTHROUGH */
- case AF_INET:
- debug2("socket %d af %d setting rdomain %d",
- sock, domain, rdomain);
- if (setsockopt(sock, ipproto, SO_RDOMAIN, &rdomain,
- sizeof(rdomain)) == -1) {
- debug("setsockopt SO_RDOMAIN: %.100s",
- strerror(errno));
- close(sock);
- return (-1);
- }
- break;
- default:
- debug("socket %d af %d does not support rdomain %d",
- sock, domain, rdomain);
- close(sock);
- return (-1);
- }
-
- return (sock);
-}
-
/* Characters considered whitespace in strsep calls. */
#define WHITESPACE " \t\r\n"
#define QUOTE "\""
@@ -274,18 +237,6 @@ a2port(const char *s)
}
int
-a2rdomain(const char *s)
-{
- long long rdomain;
- const char *errstr;
-
- rdomain = strtonum(s, 0, RT_TABLEID_MAX, &errstr);
- if (errstr != NULL)
- return -1;
- return (int)rdomain;
-}
-
-int
a2tun(const char *s, int *remote)
{
const char *errstr = NULL;