diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2013-03-14 10:21:08 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2013-03-14 10:21:08 +0000 |
commit | 924cf907d1385e13d36db11a3b3f5880fd8aa673 (patch) | |
tree | 52a861313ba58b4ff995b8cbc907a285cd6a19b0 /usr.sbin/npppd | |
parent | be3d6424ce9dd1006a888bfd5d1fba1dde308b08 (diff) |
Remove some faith-related #ifdef'd code that was only used for old IIJ
products and never enabled in our tree.
ok yasuoka@
Diffstat (limited to 'usr.sbin/npppd')
-rw-r--r-- | usr.sbin/npppd/npppd/npppd_subr.c | 17 | ||||
-rw-r--r-- | usr.sbin/npppd/npppd/npppd_subr.h | 3 | ||||
-rw-r--r-- | usr.sbin/npppd/pptp/pptpd.c | 25 |
3 files changed, 5 insertions, 40 deletions
diff --git a/usr.sbin/npppd/npppd/npppd_subr.c b/usr.sbin/npppd/npppd/npppd_subr.c index 4007a4e9c3f..06af88d0c55 100644 --- a/usr.sbin/npppd/npppd/npppd_subr.c +++ b/usr.sbin/npppd/npppd/npppd_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: npppd_subr.c,v 1.9 2012/12/05 23:20:26 deraadt Exp $ */ +/* $OpenBSD: npppd_subr.c,v 1.10 2013/03/14 10:21:07 mpi Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -547,18 +547,3 @@ adjust_tcp_mss(u_char *pktp, int lpktp, int mtu) } return 0; } - -void -set_faith(int sock, int onoff) -{ -#ifdef IP_FAITH - int ival; - - ival = onoff; - if(setsockopt(sock, IPPROTO_IP, IP_FAITH, &ival, sizeof(ival)) - < 0) { - log_printf(LOG_DEBUG, - "setsockopt(IP_FAITH) failed at %s(): %m", __func__); - } -#endif -} diff --git a/usr.sbin/npppd/npppd/npppd_subr.h b/usr.sbin/npppd/npppd/npppd_subr.h index 87a8f4b52f4..bebdfce41a1 100644 --- a/usr.sbin/npppd/npppd/npppd_subr.h +++ b/usr.sbin/npppd/npppd/npppd_subr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: npppd_subr.h,v 1.3 2012/05/08 13:15:12 yasuoka Exp $ */ +/* $OpenBSD: npppd_subr.h,v 1.4 2013/03/14 10:21:07 mpi Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -41,7 +41,6 @@ int ip_is_idle_packet (const struct ip *, int); void in_addr_range_add_route (struct in_addr_range *); void in_addr_range_delete_route (struct in_addr_range *); int adjust_tcp_mss(u_char *, int, int); -void set_faith(int, int); #ifdef __cplusplus } diff --git a/usr.sbin/npppd/pptp/pptpd.c b/usr.sbin/npppd/pptp/pptpd.c index e6a407697bc..60cd27c6ff6 100644 --- a/usr.sbin/npppd/pptp/pptpd.c +++ b/usr.sbin/npppd/pptp/pptpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pptpd.c,v 1.14 2013/03/11 17:40:11 deraadt Exp $ */ +/* $OpenBSD: pptpd.c,v 1.15 2013/03/14 10:21:07 mpi Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -25,12 +25,12 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* $Id: pptpd.c,v 1.14 2013/03/11 17:40:11 deraadt Exp $ */ +/* $Id: pptpd.c,v 1.15 2013/03/14 10:21:07 mpi Exp $ */ /**@file * This file provides a implementation of PPTP daemon. Currently it * provides functions for PAC (PPTP Access Concentrator) only. - * $Id: pptpd.c,v 1.14 2013/03/11 17:40:11 deraadt Exp $ + * $Id: pptpd.c,v 1.15 2013/03/14 10:21:07 mpi Exp $ */ #include <sys/types.h> #include <sys/param.h> @@ -295,9 +295,6 @@ pptpd_listener_start(pptpd_listener *_this) int sock, ival, sock_gre; struct sockaddr_in bind_sin, bind_sin_gre; int wildcardbinding; -#ifdef NPPPD_FAKEBIND - extern void set_faith(int, int); -#endif wildcardbinding = (_this->bind_sin.sin_addr.s_addr == INADDR_ANY)? 1 : 0; @@ -316,10 +313,6 @@ pptpd_listener_start(pptpd_listener *_this) pptpd_log(_this->self, LOG_WARNING, "setsockopt(SO_REUSEPORT) failed at %s(): %m", __func__); } -#ifdef NPPPD_FAKEBIND - if (!wildcardbinding) - set_faith(sock, 1); -#endif #if defined(IP_STRICT_RCVIF) && defined(USE_STRICT_RCVIF) ival = 1; if (setsockopt(sock, IPPROTO_IP, IP_STRICT_RCVIF, &ival, sizeof(ival)) @@ -351,10 +344,6 @@ pptpd_listener_start(pptpd_listener *_this) ntohs(_this->bind_sin.sin_port), __func__); goto fail; } -#ifdef NPPPD_FAKEBIND - if (!wildcardbinding) - set_faith(sock, 0); -#endif pptpd_log(_this->self, LOG_INFO, "Listening %s:%u/tcp (PPTP PAC) [%s]", inet_ntoa(_this->bind_sin.sin_addr), ntohs(_this->bind_sin.sin_port), _this->tun_name); @@ -366,10 +355,6 @@ pptpd_listener_start(pptpd_listener *_this) __func__); goto fail; } -#ifdef NPPPD_FAKEBIND - if (!wildcardbinding) - set_faith(sock_gre, 1); -#endif #if defined(IP_STRICT_RCVIF) && defined(USE_STRICT_RCVIF) ival = 1; if (setsockopt(sock_gre, IPPROTO_IP, IP_STRICT_RCVIF, &ival, @@ -401,10 +386,6 @@ pptpd_listener_start(pptpd_listener *_this) ntohs(bind_sin_gre.sin_port), __func__); goto fail; } -#ifdef NPPPD_FAKEBIND - if (!wildcardbinding) - set_faith(sock_gre, 0); -#endif if (wildcardbinding) { #ifdef USE_LIBSOCKUTIL if (setsockoptfromto(sock) != 0) { |