View Issue Details

IDProjectCategoryView StatusLast Update
537RackTables802.1Q VLANspublic2012-03-02 09:51
Reporteruser287Assigned Toinfrastation  
PrioritynormalSeveritytextReproducibilityN/A
Status closedResolutionfixed 
Product Version0.19.11 
Target Version0.19.12Fixed in Version0.19.12 
Summary537: Bugfix D-Link support
DescriptionBugFix for patch from issue 533
1) gateways.php: dlinkReadVLANConfig must be handler for 'get8021q', not for 'getlldpstatus'.
2) deviceconfig.php: use tabs instead of spaces for alignment!
TagsNo tags attached.

Relationships

child of 533 closedinfrastation Adding support for D-Link L2 switches 

Activities

2012-03-02 09:14

 

racktables-fixes-dlink.diff (2,065 bytes)   
Index: branches/maintenance-0.19.x/wwwroot/inc/gateways.php
===================================================================
--- branches/maintenance-0.19.x/wwwroot/inc/gateways.php	(revision 4982)
+++ branches/maintenance-0.19.x/wwwroot/inc/gateways.php	(working copy)
@@ -22,7 +22,6 @@
 );
 $gwrxlator['getlldpstatus'] = array
 (
-	'dlink' => 'dlinkReadVLANConfig',
 	'ios12' => 'ios12ReadLLDPStatus',
 	'xos12' => 'xos12ReadLLDPStatus',
 	'vrp53' => 'vrp5xReadLLDPStatus',
@@ -31,7 +30,7 @@
 );
 $gwrxlator['get8021q'] = array
 (
-	
+	'dlink' => 'dlinkReadVLANConfig',
 	'ios12' => 'ios12ReadVLANConfig',
 	'fdry5' => 'fdry5ReadVLANConfig',
 	'vrp53' => 'vrp53ReadVLANConfig',
Index: branches/maintenance-0.19.x/wwwroot/inc/deviceconfig.php
===================================================================
--- branches/maintenance-0.19.x/wwwroot/inc/deviceconfig.php	(revision 4982)
+++ branches/maintenance-0.19.x/wwwroot/inc/deviceconfig.php	(working copy)
@@ -1663,23 +1663,23 @@
 */
 function dlinkReadMacList ($text)
 {
-       $result = array();
-       foreach (preg_split ("/\n\r?/", $text) as $line)
-       {
-               if (!preg_match ('/^\s*\d+\s+/', $line))
-                       continue;
-               $w = preg_split ('/\s+/', $line);
-               if (count($w) != 5)
-                       continue;
-               $result[$w[3]][] = array
-               (
-                       'mac' => $w[2],
-                       'vid' => $w[0],
-               );
-       }
-       foreach ($result as $portname => &$maclist)
-               usort ($maclist, 'maclist_sort');
-       return $result;
+	$result = array();
+	foreach (preg_split ("/\n\r?/", $text) as $line)
+	{
+		if (!preg_match ('/^\s*\d+\s+/', $line))
+			continue;
+		$w = preg_split ('/\s+/', $line);
+		if (count($w) != 5)
+			continue;
+		$result[$w[3]][] = array
+		(
+			'mac' => $w[2],
+			'vid' => $w[0],
+		);
+	}
+	foreach ($result as $portname => &$maclist)
+		usort ($maclist, 'maclist_sort');
+	return $result;
 }
 
 function ios12ReadMacList ($text)
racktables-fixes-dlink.diff (2,065 bytes)   
infrastation

infrastation

2012-03-02 09:51

administrator   ~0000624

Committed revision 4983.

Issue History

Date Modified Username Field Change
2012-03-02 09:14 user287 New Issue
2012-03-02 09:14 user287 Status new => assigned
2012-03-02 09:14 user287 Assigned To => infrastation
2012-03-02 09:14 user287 File Added: racktables-fixes-dlink.diff
2012-03-02 09:50 infrastation Relationship added child of 533
2012-03-02 09:51 infrastation Note Added: 0000624
2012-03-02 09:51 infrastation Severity trivial => text
2012-03-02 09:51 infrastation Reproducibility always => N/A
2012-03-02 09:51 infrastation Status assigned => closed
2012-03-02 09:51 infrastation Resolution open => fixed
2012-03-02 09:51 infrastation Fixed in Version => 0.19.12
2012-03-02 09:51 infrastation Target Version => 0.19.12