summaryrefslogtreecommitdiff
path: root/lib/Vyatta
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2009-11-03 11:21:23 -0800
committerStig Thormodsrud <stig@vyatta.com>2009-11-03 11:21:23 -0800
commit70ba0c76a9c7c7699e1b2f612277d56d99828a49 (patch)
tree82e1f90b119541b158f042acd3254b5ab9aae74f /lib/Vyatta
parentd1936f6f6328143199d2a2f665ca92292c00709f (diff)
downloadvyatta-cfg-70ba0c76a9c7c7699e1b2f612277d56d99828a49.tar.gz
vyatta-cfg-70ba0c76a9c7c7699e1b2f612277d56d99828a49.zip
Fix uninitialized variable when reading carrier on admin down interface.
Diffstat (limited to 'lib/Vyatta')
-rwxr-xr-xlib/Vyatta/Interface.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Vyatta/Interface.pm b/lib/Vyatta/Interface.pm
index 924058a..ce909f0 100755
--- a/lib/Vyatta/Interface.pm
+++ b/lib/Vyatta/Interface.pm
@@ -228,6 +228,7 @@ sub carrier {
or return;
my $val = <$carrier>;
+ $val = 0 if ! defined $val # proc entry not readable on down interface
chomp $val;
close $carrier;
return $val;