summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2010-09-27 00:12:17 +0000
committerYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2010-09-27 00:12:17 +0000
commit9e807d9ee25f16b6361823ca9f35a1ad5a142018 (patch)
treeb5414003be537624e1b5722d858612e5ed02ada2 /usr.sbin
parentc0968cd27b0f51555b3c12e31e6a8148ae9a73f8 (diff)
IP_PIPEX mistakenly was applied to the 1723/tcp socket. Apply the option
to the gre socket.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/npppd/pptp/pptpd.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/usr.sbin/npppd/pptp/pptpd.c b/usr.sbin/npppd/pptp/pptpd.c
index 31baf5d5122..4b7fae79426 100644
--- a/usr.sbin/npppd/pptp/pptpd.c
+++ b/usr.sbin/npppd/pptp/pptpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pptpd.c,v 1.6 2010/09/24 14:50:30 yasuoka Exp $ */
+/* $OpenBSD: pptpd.c,v 1.7 2010/09/27 00:12:16 yasuoka 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.6 2010/09/24 14:50:30 yasuoka Exp $ */
+/* $Id: pptpd.c,v 1.7 2010/09/27 00:12:16 yasuoka 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.6 2010/09/24 14:50:30 yasuoka Exp $
+ * $Id: pptpd.c,v 1.7 2010/09/27 00:12:16 yasuoka Exp $
*/
#include <sys/types.h>
#include <sys/param.h>
@@ -332,12 +332,6 @@ pptpd_listener_start(pptpd_listener *_this)
pptpd_log(_this->self, LOG_WARNING,
"%s(): setsockopt(IP_STRICT_RCVIF) failed: %m", __func__);
#endif
-#ifdef IP_PIPEX
- ival = 1;
- if (setsockopt(sock, IPPROTO_IP, IP_PIPEX, &ival, sizeof(ival)) != 0)
- pptpd_log(_this->self, LOG_WARNING,
- "%s(): setsockopt(IP_PIPEX) failed: %m", __func__);
-#endif
if ((ival = fcntl(sock, F_GETFL, 0)) < 0) {
pptpd_log(_this->self, LOG_ERR,
"fcntl(F_GET_FL) failed at %s(): %m", __func__);
@@ -388,6 +382,13 @@ pptpd_listener_start(pptpd_listener *_this)
pptpd_log(_this->self, LOG_WARNING,
"%s(): setsockopt(IP_STRICT_RCVIF) failed: %m", __func__);
#endif
+#ifdef IP_PIPEX
+ ival = 1;
+ if (setsockopt(sock_gre, IPPROTO_IP, IP_PIPEX, &ival, sizeof(ival))
+ != 0)
+ pptpd_log(_this->self, LOG_WARNING,
+ "%s(): setsockopt(IP_PIPEX) failed: %m", __func__);
+#endif
if ((ival = fcntl(sock_gre, F_GETFL, 0)) < 0) {
pptpd_log(_this->self, LOG_ERR,
"fcntl(F_GET_FL) failed at %s(): %m", __func__);