diff options
author | gnhb <gnoahb@gmail.com> | 2010-03-29 14:29:15 +0700 |
---|---|---|
committer | gnhb <gnoahb@gmail.com> | 2010-03-29 14:29:15 +0700 |
commit | a216a03a00166350c22162f1e0da03927e23af10 (patch) | |
tree | 21155c39b1da90219937f199ab9569ecba277fd5 | |
parent | a728d6f91e501a3e68e425841fa3895e4bb6915a (diff) | |
download | pfsense-a216a03a00166350c22162f1e0da03927e23af10.zip pfsense-a216a03a00166350c22162f1e0da03927e23af10.tar.gz |
Fix a few small bugs in new PPP code, and one type in pfsense-utils.inc
-rw-r--r-- | etc/inc/interfaces.inc | 6 | ||||
-rw-r--r-- | etc/inc/pfsense-utils.inc | 6 |
2 files changed, 5 insertions, 7 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index b1ebbd9..f2ad8d4 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -971,7 +971,6 @@ EOD; $mpdconf .= <<<EOD # Create link. create link static lnk{$interface} modem -# We expect to be authenticated by peer using any protocol. set link disable chap pap set link accept chap pap eap set link enable no-orig-auth @@ -983,9 +982,8 @@ EOD; if (!empty($ppp['username'])) { $mpdconf .= <<<EOD -# Configure the account name. Password will be taken from mpd.secret. set auth authname "{$ppp['username']}" - set auth password "{$ppp['password']}" + set auth password "{$ppp['password']}" EOD; } @@ -1035,7 +1033,7 @@ EOD; $fdlnkq = fopen("{$g['varetc_path']}/mpd_{$interface}.query", "w"); if (!$fdlnkq) { - /* NOTE: It is not fatal if we cannot write the query."); + /* NOTE: It is not fatal if we cannot write the query.") */ log_error("Error: cannot open mpd_{$interface}.query in interface_ppp_configure().\n"); } else { $linkquery = <<<EOD diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index d484cfa..f9158d7 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -1230,7 +1230,7 @@ function get_interface_info($ifdescr) { $ifinfo['macaddr'] = $ifinfotmp['macaddr']; $ifinfo['ipaddr'] = $ifinfotmp['ipaddr']; $ifinfo['subnet'] = $ifinfotmp['subnet']; - if (isset($ififnotmp['link0'])) + if (isset($ifinfotmp['link0'])) $link0 = "down"; @@ -1319,8 +1319,8 @@ function get_interface_info($ifdescr) { if (empty($dev)) break; if (file_exists("/dev/{$dev}")) { - $ifinfo['ppplink'] = $dev; - if (file_exists("{$g['varrun_path']}/mpd_{$if}.pid") && file_exists("{$g['varetc_path']}/mpd_{$if}.query")) { + $ifinfo['ppplink'] = $ifinfo['if']; + if (file_exists("{$g['varrun_path']}/ppp_{$if}.pid") && file_exists("{$g['varetc_path']}/mpd_{$if}.query")) { $pppid = substr($ifinfo['if'], 3); $sec = trim(`/usr/bin/nc 127.0.0.1 500{$pppid} < {$g['varetc_path']}/mpd_{$if}.query | grep 'Session time' | cut -f7 -d ' '`); $ifinfo['ppp_uptime'] = convert_seconds_to_hms($sec); |