summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/misc.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@cvs.openbsd.org>2010-01-09 23:04:14 +0000
committerDarren Tucker <dtucker@cvs.openbsd.org>2010-01-09 23:04:14 +0000
commit18588663d4517601e53a9dedf2bd261d13450217 (patch)
treea3221b498de52d3263fa28044738d6177b798709 /usr.bin/ssh/misc.c
parente58c64a20a03c1b699326a7fbf2d421920484f23 (diff)
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 'usr.bin/ssh/misc.c')
-rw-r--r--usr.bin/ssh/misc.c51
1 files changed, 1 insertions, 50 deletions
diff --git a/usr.bin/ssh/misc.c b/usr.bin/ssh/misc.c
index 883a62f9950..777adddd223 100644
--- a/usr.bin/ssh/misc.c
+++ b/usr.bin/ssh/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.
@@ -144,43 +144,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 "\""
@@ -261,18 +224,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;