Commit f9c9f14e authored by Mac Newbold's avatar Mac Newbold
Browse files

Fixed vlan table parsing bug that broke sharks.

parent ec093472
......@@ -134,12 +134,13 @@ sub ReadTranslationTable {
while (@row = $sth->fetchrow_array()) {
my @list = split(" ",$row[1]);
foreach $port (@list) {
if ($port =~ /^(sh\d+)-\d(:.*)$/) { $port = "$1$2"; }
my ($node,$card) = split(":",$port);
if ($card =~ /[a-zA-Z]/) {
# specified ala ethX
my $sth2 = $dbh->
query("select card from interfaces where node_id='$node' ".
"and iface='$card'");
query("select card from interfaces where (node_id='$node' ".
"or node_id='$node-1') and iface='$card'");
$card = ($sth2->fetchrow_array())[0];
print "Had '$port', changed to '$node:$card'\n" if $debug > 2;
$port = "$node:$card";
......
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