--- rpms/e-smith-base/sme8/e-smith-base-5.2.0-pppoeMlimit.patch 2013/01/23 03:47:15 1.1 +++ rpms/e-smith-base/sme8/e-smith-base-5.2.0-pppoeMlimit.patch 2013/02/02 16:59:10 1.3 @@ -1,10 +1,21 @@ diff -ruN e-smith-base-5.2.0.old/root/etc/e-smith/templates/var/service/wan/run.pppoe.conf/mlimit e-smith-base-5.2.0/root/etc/e-smith/templates/var/service/wan/run.pppoe.conf/mlimit --- e-smith-base-5.2.0.old/root/etc/e-smith/templates/var/service/wan/run.pppoe.conf/mlimit 2007-01-27 01:56:31.000000000 +0000 -+++ e-smith-base-5.2.0/root/etc/e-smith/templates/var/service/wan/run.pppoe.conf/mlimit 2013-01-23 03:32:56.000000000 +0000 -@@ -1,5 +1,5 @@ ++++ e-smith-base-5.2.0/root/etc/e-smith/templates/var/service/wan/run.pppoe.conf/mlimit 2013-01-31 01:23:21.000000000 +0000 +@@ -1,5 +1,14 @@ { - # memory limit to catch any memory leak before it kills the system +-# memory limit to catch any memory leak before it kills the system - my $mlimit = $pppoe{Mlimit} || '25000000'; -+ my $mlimit = $pppoe{Mlimit} || '100000000'; - $OUT = "PPPD_MLIMIT=$mlimit"; +- $OUT = "PPPD_MLIMIT=$mlimit"; ++ # memory limit to catch any memory leak before it kills the system ++ use constant MIN_MEMORY_LIMIT => 100000000; ++ ++ # If there is a memory limit in the database and it is below the minimum, delete it. ++ if (defined $pppoe{Mlimit} && $pppoe{Mlimit} < MIN_MEMORY_LIMIT) ++ { ++ $DB->get_prop_and_delete('pppoe','Mlimit'); ++ } ++ ++ $OUT = "PPPD_MLIMIT="; ++ $OUT .= $pppoe{Mlimit} || MIN_MEMORY_LIMIT; } ++