diff options
-rwxr-xr-x | lib/Vyatta/Interface.pm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Vyatta/Interface.pm b/lib/Vyatta/Interface.pm index 1231786..200cad8 100755 --- a/lib/Vyatta/Interface.pm +++ b/lib/Vyatta/Interface.pm @@ -153,6 +153,7 @@ sub new { if ($dev =~ /^ppp(\d+)/) { my $n = $1; my $eth = find_pppoe($n); + if ($eth) { my $self = { name => $name, @@ -160,9 +161,10 @@ sub new { path => "interfaces ethernet $eth pppoe $n", dev => $dev, vif => $vif, - }; - bless $self, $class; - return $self; + }; + bless $self, $class; + return $self; + } } return; # nothing |