From b1da5ca279168f258232c473bf9d433d85c4b9e6 Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Sat, 19 Nov 2011 22:45:08 +1100 Subject: [PATCH] Compilation config change... - cosmetics, ABOUT page #2 - PPTP user config VPN to be found only in Ext and VPN based build --- release/src/Makefile | 38 ++++++++++++++++++------------------- release/src/router/Makefile | 2 +- release/src/router/config/config.in | 3 +++ release/src/router/config_base | 1 + release/src/router/rc/Makefile | 7 ++++--- release/src/router/rc/rc.h | 4 ++-- release/src/router/rc/services.c | 2 +- release/src/router/rc/wan.c | 4 ++++ release/src/router/www/Makefile | 16 ++++++++-------- release/src/router/www/about.asp | 21 ++++++++++++-------- release/src/router/www/tomato.js | 4 ++-- 11 files changed, 58 insertions(+), 44 deletions(-) diff --git a/release/src/Makefile b/release/src/Makefile index 6cc89aeb51..e7951dee35 100644 --- a/release/src/Makefile +++ b/release/src/Makefile @@ -46,7 +46,7 @@ ND = "ND" endif SNMP ?= "n" VLAN ?= "n" -PPTP ?= "n" +USERPPTP ?= "n" ifeq ($(NVRAM_SIZE),) NVRAM_SIZE = 0 @@ -250,7 +250,7 @@ what: # SAMBA3, OPENVPN, IPV6SUPP, EBTABLES, NTFS, MEDIASRV, BBEXTRAS, USBEXTRAS, BCM57, SLIM # NOCAT # SNMP -# PPTP +# USERPPTP # VLAN define RouterOptions @@ -360,9 +360,9 @@ define RouterOptions sed -i "/TCONFIG_SNMP/d" $(1); \ echo "TCONFIG_SNMP=y" >>$(1); \ fi; \ - if [ "$(PPTP)" = "y" ]; then \ - sed -i "/TCONFIG_PPTP/d" $(1); \ - echo "TCONFIG_PPTP=y" >>$(1); \ + if [ "$(USERPPTP)" = "y" ]; then \ + sed -i "/TCONFIG_USERPPTP/d" $(1); \ + echo "TCONFIG_USERPPTP=y" >>$(1); \ fi; \ if [ "$(VLAN)" = "y" ]; then \ sed -i "/TCONFIG_VLAN/d" $(1); \ @@ -640,10 +640,10 @@ endif ## Make the "normal (with NTFS support) + VPN" build e: ifeq ($(CONFIG_LINUX26),y) - @$(MAKE) bin OPENVPN=y PPTP=y NTFS=y BBEXTRAS=y USBEXTRAS=y EBTABLES=y NO_LIBOPT=y MEDIASRV=y IPV6SUPP=y B=E BUILD_DESC="$(VPN)" USB="USB" VLAN="$(VLAN)" SNMP=y + @$(MAKE) bin OPENVPN=y USERPPTP=y NTFS=y BBEXTRAS=y USBEXTRAS=y EBTABLES=y NO_LIBOPT=y MEDIASRV=y IPV6SUPP=y B=E BUILD_DESC="$(VPN)" USB="USB" VLAN="$(VLAN)" SNMP=y else -# @$(MAKE) bin OPENVPN=y PPTP=y NTFS=y B=E BUILD_DESC="$(VPN)" USB="USB" VLAN="$(VLAN)" - @$(MAKE) bin OPENVPN=y PPTP=y BBEXTRAS=y USBEXTRAS=y NTFS=y B=E BUILD_DESC="$(VPN)" USB="USB" SNMP=y VLAN="$(VLAN)" +# @$(MAKE) bin OPENVPN=y USERPPTP=y NTFS=y B=E BUILD_DESC="$(VPN)" USB="USB" VLAN="$(VLAN)" + @$(MAKE) bin OPENVPN=y USERPPTP=y BBEXTRAS=y USBEXTRAS=y NTFS=y B=E BUILD_DESC="$(VPN)" USB="USB" SNMP=y VLAN="$(VLAN)" endif ## Make the "Mini: no USB, no CIFS, no Zebra" build - targeted for Netgear routers @@ -661,24 +661,24 @@ i: ## Make the "No USB with IPv6, no Zebra, with VPN" build - for 4MB routers ifeq ($(CONFIG_LINUX26),y) j: - @$(MAKE) bin JFFSv1=y NO_CIFS=y NO_XXTP=y SLIM=y NO_SAMBA=y NO_ZEBRA=y IPV6SUPP=y OPENVPN=y PPTP=y NO_LIBOPT=y B=I BUILD_DESC="MiniIPv6-VPN" USB="" VLAN="$(VLAN)" SNMP="$(SNMP)" + @$(MAKE) bin JFFSv1=y NO_CIFS=y NO_XXTP=y SLIM=y NO_SAMBA=y NO_ZEBRA=y IPV6SUPP=y OPENVPN=y USERPPTP=y NO_LIBOPT=y B=I BUILD_DESC="MiniIPv6-VPN" USB="" VLAN="$(VLAN)" SNMP="$(SNMP)" endif ## Make the "normal with Extras and NTFS" build m: ifeq ($(CONFIG_LINUX26),y) - @$(MAKE) bin NTFS=y BBEXTRAS=y USBEXTRAS=y EBTABLES=y NO_LIBOPT=y MEDIASRV=y IPV6SUPP=y B=M BUILD_DESC="Ext" USB="USB" VLAN="$(VLAN)" SNMP=y PPTP=y + @$(MAKE) bin NTFS=y BBEXTRAS=y USBEXTRAS=y EBTABLES=y NO_LIBOPT=y MEDIASRV=y IPV6SUPP=y B=M BUILD_DESC="Ext" USB="USB" VLAN="$(VLAN)" SNMP=y USERPPTP=y else - @$(MAKE) bin NTFS=y BBEXTRAS=y USBEXTRAS=y B=M BUILD_DESC="Ext" USB="USB" VLAN="$(VLAN)" SNMP=y PPTP=y + @$(MAKE) bin NTFS=y BBEXTRAS=y USBEXTRAS=y B=M BUILD_DESC="Ext" USB="USB" VLAN="$(VLAN)" SNMP=y USERPPTP=y endif ## Roadkill ## Make the "normal (with NTFS support) + VPN + NOCAT" build nc: ifeq ($(CONFIG_LINUX26),y) - @$(MAKE) bin OPENVPN=y PPTP=y NTFS=y BBEXTRAS=y USBEXTRAS=y EBTABLES=y NO_LIBOPT=y MEDIASRV=y IPV6SUPP=y B=NC BUILD_DESC="$(VPN)" USB="USB" SNMP=y VLAN="$(VLAN)" NOCAT=y BUILD_DESC+="-$(NC)" + @$(MAKE) bin OPENVPN=y USERPPTP=y NTFS=y BBEXTRAS=y USBEXTRAS=y EBTABLES=y NO_LIBOPT=y MEDIASRV=y IPV6SUPP=y B=NC BUILD_DESC="$(VPN)" USB="USB" SNMP=y VLAN="$(VLAN)" NOCAT=y BUILD_DESC+="-$(NC)" else - @$(MAKE) bin OPENVPN=y PPTP=y NTFS=y B=NC BUILD_DESC="$(VPN)" USB="USB" VLAN="$(VLAN)" NOCAT=y BUILD_DESC+=" $(NC)" + @$(MAKE) bin OPENVPN=y USERPPTP=y NTFS=y B=NC BUILD_DESC="$(VPN)" USB="USB" VLAN="$(VLAN)" NOCAT=y BUILD_DESC+=" $(NC)" endif ## Toastman @@ -707,23 +707,23 @@ t: @$(MAKE) bin B=S USB="" BBEXTRAS=y EBTABLES=y NO_LIBOPT=y $(if $(filter r2, $(MIPS32)),,BCM57=y) IPV6SUPP=y BUILD_DESC="Std" SNMP=y VLAN="$(VLAN)" ## Make the "No USB with OpenVPN and Extras" build (K26 only, for 8MB flash) u: - @$(MAKE) bin B=V USB="" BBEXTRAS=y EBTABLES=y NO_LIBOPT=y $(if $(filter r2, $(MIPS32)),,BCM57=y) IPV6SUPP=y OPENVPN=y PPTP=y BUILD_DESC="$(VPN)" SNMP=y VLAN="$(VLAN)" + @$(MAKE) bin B=V USB="" BBEXTRAS=y EBTABLES=y NO_LIBOPT=y $(if $(filter r2, $(MIPS32)),,BCM57=y) IPV6SUPP=y OPENVPN=y USERPPTP=y BUILD_DESC="$(VPN)" SNMP=y VLAN="$(VLAN)" endif ## Make the "VPN with no USB support" build v: ifeq ($(CONFIG_LINUX26),y) - @$(MAKE) bin OPENVPN=y PPTP=y NO_JFFS=y B=V BUILD_DESC="$(VPN)" USB="" SNMP=y VLAN="$(VLAN)" + @$(MAKE) bin OPENVPN=y USERPPTP=y NO_JFFS=y B=V BUILD_DESC="$(VPN)" USB="" SNMP=y VLAN="$(VLAN)" else - @$(MAKE) bin OPENVPN=y PPTP=y BBEXTRAS=y BCM57=y B=V BUILD_DESC="$(VPN)" USB="" SNMP=y VLAN="$(VLAN)" + @$(MAKE) bin OPENVPN=y USERPPTP=y BBEXTRAS=y BCM57=y B=V BUILD_DESC="$(VPN)" USB="" SNMP=y VLAN="$(VLAN)" endif ## Make the "Small VPN with no USB support" build vs: ifeq ($(CONFIG_LINUX26),y) - @$(MAKE) bin OPENVPN=y PPTP=y NO_JFFS=y NO_CIFS=y B=V BUILD_DESC="SmallVPN" USB="" + @$(MAKE) bin OPENVPN=y USERPPTP=y NO_JFFS=y NO_CIFS=y B=V BUILD_DESC="SmallVPN" USB="" else - @$(MAKE) bin OPENVPN=y PPTP=y NO_JFFS=y NO_CIFS=y BCM57=y B=VS BUILD_DESC="SmallVPN" USB="" + @$(MAKE) bin OPENVPN=y USERPPTP=y NO_JFFS=y NO_CIFS=y BCM57=y B=VS BUILD_DESC="SmallVPN" USB="" endif ## Make Mips32r2 builds @@ -810,7 +810,7 @@ n60t: @$(MAKE) r2t NVRAM_SIZE=60 LINKSYS_E=y n60v: - @$(MAKE) bin MIPS32=r2 B=V USB="" NVRAM_SIZE=60 LINKSYS_E=y BBEXTRAS=y EBTABLES=y NO_LIBOPT=y IPV6SUPP=y OPENVPN=y PPTP=y BUILD_DESC="$(VPN)" + @$(MAKE) bin MIPS32=r2 B=V USB="" NVRAM_SIZE=60 LINKSYS_E=y BBEXTRAS=y EBTABLES=y NO_LIBOPT=y IPV6SUPP=y OPENVPN=y USERPPTP=y BUILD_DESC="$(VPN)" setprofile: diff --git a/release/src/router/Makefile b/release/src/router/Makefile index 7ff792e1cb..3238dc9a32 100644 --- a/release/src/router/Makefile +++ b/release/src/router/Makefile @@ -452,7 +452,7 @@ ifeq ($(TCONFIG_L7PAT),y) cp layer7/squished/*.pat $(TARGETDIR)/rom/etc/l7-protocols endif -ifeq ($(TCONFIG_PPTP),y) +ifeq ($(TCONFIG_USERPPTP),y) @mkdir -p $(TARGETDIR)/rom/etc/vpn cp rc/vpn/* $(TARGETDIR)/rom/etc/vpn chmod +x $(TARGETDIR)/rom/etc/vpn/* diff --git a/release/src/router/config/config.in b/release/src/router/config/config.in index 7a10e4d350..ef8eefd343 100644 --- a/release/src/router/config/config.in +++ b/release/src/router/config/config.in @@ -124,3 +124,6 @@ config TCONFIG_VLAN bool "VLAN GUI" default n +config TCONFIG_USERPPTP + bool "User PPTP" + default n diff --git a/release/src/router/config_base b/release/src/router/config_base index 342f824bcf..e2161724d3 100644 --- a/release/src/router/config_base +++ b/release/src/router/config_base @@ -30,3 +30,4 @@ TCONFIG_SAMBASRV=y # TCONFIG_NOCAT is not set # TCONFIG_SNMP is not set # TCONFIG_VLAN is not set +# TCONFIG_USERPPTP is not set diff --git a/release/src/router/rc/Makefile b/release/src/router/rc/Makefile index 32c168f855..8007202087 100644 --- a/release/src/router/rc/Makefile +++ b/release/src/router/rc/Makefile @@ -17,8 +17,6 @@ OBJS += buttons.o restrict.o gpio.o sched.o OBJS += account.o OBJS += arpbind.o OBJS += qoslimit.o -OBJS += pptp_client.o - # heartbeat.o ifeq ($(TCONFIG_USB),y) @@ -45,11 +43,14 @@ ifeq ($(TOMATO_SL),1) OBJS += samba.o endif - ifeq ($(TCONFIG_SNMP),y) OBJS += snmp.o endif +ifeq ($(TCONFIG_USERPPTP),y) +OBJS += pptp_client.o +endif + all: rc rc: $(OBJS) diff --git a/release/src/router/rc/rc.h b/release/src/router/rc/rc.h index d3fa3b6e47..1b76f470ff 100644 --- a/release/src/router/rc/rc.h +++ b/release/src/router/rc/rc.h @@ -405,13 +405,13 @@ extern void stop_sched(void); extern void start_snmpd(void); extern void stop_snmpd(void); -#ifdef TCONFIG_PPTP +#ifdef TCONFIG_USERPPTP // pptp_client.c extern void start_pptp_client(void); extern void stop_pptp_client(void); extern int write_pptpvpn_resolv(FILE*); #else -#define write_vpn_resolv(f) (0) +#define write_pptpvpn_resolv(f) (0) #endif //nvram diff --git a/release/src/router/rc/services.c b/release/src/router/rc/services.c index 2e11d7bf17..664c8657ce 100644 --- a/release/src/router/rc/services.c +++ b/release/src/router/rc/services.c @@ -2568,7 +2568,7 @@ TOP: } #endif -#ifdef TCONFIG_PPTP +#ifdef TCONFIG_USERPPTP if (strcmp(service, "pptpclient") == 0) { if (action & A_STOP) stop_pptp_client(); if (action & A_START) start_pptp_client(); diff --git a/release/src/router/rc/wan.c b/release/src/router/rc/wan.c index 94c16d56d2..ff7352cf7d 100644 --- a/release/src/router/rc/wan.c +++ b/release/src/router/rc/wan.c @@ -902,8 +902,10 @@ void start_wan_done(char *wan_ifname) if (wanup) start_vpn_eas(); +#ifdef TCONFIG_USERPPTP if (wanup && nvram_get_int("pptp_client_enable")) start_pptp_client(); +#endif unlink(wan_connecting); @@ -937,8 +939,10 @@ void stop_wan(void) stop_ppp(); stop_dhcpc(); stop_vpn_eas(); +#ifdef TCONFIG_USERPPTP if (nvram_get_int("pptp_client_enable")) stop_pptp_client(); +#endif clear_resolv(); nvram_set("wan_get_dns", ""); diff --git a/release/src/router/www/Makefile b/release/src/router/www/Makefile index 911f668471..7d3cc8474e 100644 --- a/release/src/router/www/Makefile +++ b/release/src/router/www/Makefile @@ -168,18 +168,24 @@ endif # Remove AES ciphers from the GUI if openssl doesn't have an AES directory ifeq ($(TCONFIG_OPENVPN),y) test -d ../openssl/crypto/aes || sed -i $(INSTALLDIR)/www/vpn.js -e "/AES-BEGIN/,/AES-END/d" - sed -i $(INSTALLDIR)/www/about.asp -e "/PPTP-BEGIN/,/PPTP-END/d" else rm -f $(INSTALLDIR)/www/vpn-{client,server}.asp $(INSTALLDIR)/www/vpn.js sed -i $(INSTALLDIR)/www/tomato.js -e "/OPENVPN-BEGIN/,/OPENVPN-END/d" sed -i $(INSTALLDIR)/www/about.asp -e "/OPENVPN-BEGIN/,/OPENVPN-END/d" -ifneq ($(TCONFIG_PPTP),y) +ifneq ($(TCONFIG_USERPPTP),y) sed -i $(INSTALLDIR)/www/tomato.js -e "/VPN-BEGIN/,/VPN-END/d" sed -i $(INSTALLDIR)/www/admin-access.asp -e "/VPN-BEGIN/,/VPN-END/d" sed -i $(INSTALLDIR)/www/about.asp -e "/VPN-BEGIN/,/VPN-END/d" + sed -i $(INSTALLDIR)/www/about.asp -e "/JYAVENARD-BEGIN/,/JYAVENARD-END/d" endif endif +ifneq ($(TCONFIG_USERPPTP),y) + rm -f $(INSTALLDIR)/www/vpn-pptp.asp + sed -i $(INSTALLDIR)/www/tomato.js -e "/USERPPTP-BEGIN/,/USERPPTP-END/d" + sed -i $(INSTALLDIR)/www/about.asp -e "/USERPPTP-BEGIN/,/USERPPTP-END/d" +endif + # Only include the snmp pages if SNMP is compiled in ifneq ($(TCONFIG_SNMP),y) rm -f $(INSTALLDIR)/www/admin-snmp.asp @@ -187,12 +193,6 @@ ifneq ($(TCONFIG_SNMP),y) sed -i $(INSTALLDIR)/www/about.asp -e "/SNMP-BEGIN/,/SNMP-END/d" endif -ifneq ($(TCONFIG_PPTP),y) - rm -f $(INSTALLDIR)/www/vpn-pptp.asp - sed -i $(INSTALLDIR)/www/tomato.js -e "/PPTP-BEGIN/,/PPTP-END/d" - sed -i $(INSTALLDIR)/www/about.asp -e "/PPTP-BEGIN/,/PPTP-END/d" -endif - # clean up cd $(INSTALLDIR)/www && \ for F in $(wildcard *.asp *.js *.jsx *.html); do \ diff --git a/release/src/router/www/about.asp b/release/src/router/www/about.asp index 1ed74b595d..a8241b7290 100644 --- a/release/src/router/www/about.asp +++ b/release/src/router/www/about.asp @@ -101,14 +101,14 @@ IPv6 support, Copyright (C) 2008-2011 Fedor Kozhevnikov, Ray Van Tassle, Wes Campaigne
http://www.tomatousb.org

- -OpenVPN integration and GUI
+This compilation may also include:
+
+ +OpenVPN integration and GUI
Copyright (C) 2010 Keith Moyer
tomatovpn@keithmoyer.com

-
-This compilation may also include:
-
+ "Teddy Bear" current features, notably:
- USB Support, Samba, FTP, Media Servers
- Web Monitor, Per-connection transfer rates
@@ -139,14 +139,19 @@ Copyright (C) 2011 MichaƂ Rupental
http://openlinksys.info

+ "JYAvenard" Features:
- + +- OpenVPN enhancements & username/password only authentication
+ + - PPTP VPN client integration and GUI
- -- OpenVPN username/password only authentication
+ Copyright (C) 2010-2011 Jean-Yves Avenard
jean-yves@avenard.org

+ + "Teaman" Features:
- QOS-detailed & ctrate improved filters
- Per-IP bandwidth monitoring of LAN clients [cstats v2]
diff --git a/release/src/router/www/tomato.js b/release/src/router/www/tomato.js index ecfa02a683..34a2f80743 100644 --- a/release/src/router/www/tomato.js +++ b/release/src/router/www/tomato.js @@ -2436,9 +2436,9 @@ REMOVE-END */ ['OpenVPN Server', 'server.asp'], ['OpenVPN Client', 'client.asp'], /* OPENVPN-END */ -/* PPTP-BEGIN */ +/* USERPPTP-BEGIN */ ['PPTP Client', 'pptp.asp'] ] ], -/* PPTP-END */ +/* USERPPTP-END */ /* VPN-END */ null, ['Administration', 'admin', 0, [ -- 2.11.4.GIT