diff options
author | mikeb <mikeb@openbsd.org> | 2011-06-21 17:31:07 +0000 |
---|---|---|
committer | mikeb <mikeb@openbsd.org> | 2011-06-21 17:31:07 +0000 |
commit | 13ae2b572f8282cbf2cf28cf008318ea950727ec (patch) | |
tree | 2243a17a7624c0479642fd924828874cb65328b2 /usr.sbin/ftp-proxy | |
parent | remove some unnecessary casts. ok blambert deraadt kettenis matthew (diff) | |
download | wireguard-openbsd-13ae2b572f8282cbf2cf28cf008318ea950727ec.tar.xz wireguard-openbsd-13ae2b572f8282cbf2cf28cf008318ea950727ec.zip |
Convert SO_RTABLE's protocol level to the SOL_SOCKET; ok claudio
Diffstat (limited to 'usr.sbin/ftp-proxy')
-rw-r--r-- | usr.sbin/ftp-proxy/ftp-proxy.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/ftp-proxy/ftp-proxy.c b/usr.sbin/ftp-proxy/ftp-proxy.c index 2a56df3406e..c077f8e61f9 100644 --- a/usr.sbin/ftp-proxy/ftp-proxy.c +++ b/usr.sbin/ftp-proxy/ftp-proxy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ftp-proxy.c,v 1.22 2011/04/28 00:17:28 mikeb Exp $ */ +/* $OpenBSD: ftp-proxy.c,v 1.23 2011/06/21 17:31:07 mikeb Exp $ */ /* * Copyright (c) 2004, 2005 Camiel Dobbelaar, <cd@sentia.nl> @@ -428,9 +428,8 @@ handle_connection(const int listen_fd, short event, void *ev) goto fail; } len = sizeof(s->client_rd); - if (client_sa->sa_family == AF_INET && - getsockopt(s->client_fd, IPPROTO_IP, SO_RTABLE, &s->client_rd, - &len)) { + if (getsockopt(s->client_fd, SOL_SOCKET, SO_RTABLE, &s->client_rd, + &len) && errno != ENOPROTOOPT) { logmsg(LOG_CRIT, "#%d getsockopt failed: %s", s->id, strerror(errno)); goto fail; |