Commit 5e35c36d authored by Jonathon Duerig's avatar Jonathon Duerig
Browse files

Fail more gracefully when receiving a bogos vlan range.

parent d5f5b7d5
......@@ -74,6 +74,7 @@ use Compress::Zlib;
use File::Temp qw(tempfile);
use MIME::Base64;
use Digest::SHA1 qw(sha1_hex);
use Scalar::Util qw(looks_like_number);
# Configure variables
my $TB = "@prefix@";
......@@ -6218,6 +6219,8 @@ sub GetSuggestedVlanFromHop($)
if (!defined($capref));
my $tag = GeniXML::GetText("suggestedVLANRange", $capref);
$tag = undef
if (defined($tag) && ! looks_like_number($tag));
return $tag;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment