aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/ppp/files
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2013-10-10 14:58:12 +0000
committerJo-Philipp Wich <jow@openwrt.org>2013-10-10 14:58:12 +0000
commit5380fa27e987854a7b1f2336cd9af4cb0edbe540 (patch)
tree24c7df25830608eef5586bd4cc493923f056ad92 /package/network/services/ppp/files
parent61e83f9c29f873c89c725b9deae479b8f6b2401a (diff)
downloadupstream-5380fa27e987854a7b1f2336cd9af4cb0edbe540.tar.gz
upstream-5380fa27e987854a7b1f2336cd9af4cb0edbe540.tar.bz2
upstream-5380fa27e987854a7b1f2336cd9af4cb0edbe540.zip
ppp: correct module loaded check in proto_pptp_setup
proto_pptp_setup is responsible for loading the required modules to establish a pptp connection to a foreign peer. The function checks whether all required modules are already loaded, before actually loading them. It seems that the filter being used to accomplish this, is not restrictive enough in some cases. For instance when pptp nat helper modules are present on a system, and already loaded before a pptp connection is enabled. Then the search filter (possibly) returns the following for module=pptp, where actually no matches are expected, resulting in the pptp.ko module not being loaded, thereby failing to establish the pptp connection. # module="pptp" ; grep "$module" /proc/modules nf_nat_pptp 1312 0 - Live 0x86ce7000 nf_conntrack_pptp 3072 1 nf_nat_pptp, Live 0x86cb9000 nf_nat_proto_gre 784 1 nf_nat_pptp, Live 0x86cba000 nf_conntrack_proto_gre 2368 1 nf_conntrack_pptp, Live 0x86cbf000 nf_nat 9792 13 nf_nat_rtsp,nf_nat_tftp,nf_nat_sip,nf_nat_pptp,nf_nat_h323,nf_nat_proto_gre,nf_nat_amanda,nf_nat_irc,nf_nat_ftp,ipt_REDIRECT,ipt_NETMAP,ipt_MASQUERADE,iptable_nat, Live 0x86ca8000 nf_conntrack 37264 31 nf_nat_rtsp,nf_conntrack_rtsp,nf_nat_tftp,nf_conntrack_tftp,nf_nat_snmp_basic,nf_conntrack_snmp,nf_nat_sip,nf_conntrack_sip,nf_nat_pptp,nf_conntrack_pptp,nf_nat_h323,nf_conntrack_h323,nf_conntrack_proto_gre,nf_nat_amanda,nf_conntrack_amanda,nf_conntrack_broadcast,nf_nat_irc,nf_conntrack_irc,nf_nat_ftp,nf_conntrack_ftp,ipt_MASQUERADE,iptable_nat,nf_nat,xt_helper,xt_connmark,xt_connbytes,xt_conntrack,xt_CT,xt_NOTRACK,xt_state,nf_conntrack_ipv4, Live 0x86c90000 The search filter can be made more accurate/restrictive, by requiring the occurance of the exact name of the module at the beginning of a line in /proc/modules. # module="pptp" ; grep "^$module " /proc/modules pptp 13296 2 - Live 0x86e80000 Signed-off-by: Tijs Van Buggenhout <tvb@able.be> SVN-Revision: 38358
Diffstat (limited to 'package/network/services/ppp/files')
-rwxr-xr-xpackage/network/services/ppp/files/ppp.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/network/services/ppp/files/ppp.sh b/package/network/services/ppp/files/ppp.sh
index 43a7de9658..02b40558ca 100755
--- a/package/network/services/ppp/files/ppp.sh
+++ b/package/network/services/ppp/files/ppp.sh
@@ -190,7 +190,7 @@ proto_pptp_setup() {
local load
for module in slhc ppp_generic ppp_async ppp_mppe ip_gre gre pptp; do
- grep -q "$module" /proc/modules && continue
+ grep -q "^$module " /proc/modules && continue
/sbin/insmod $module 2>&- >&-
load=1
done