Index: html/includes/print/port.inc.php
===================================================================
--- html/includes/print/port.inc.php	(revision 6918)
+++ html/includes/print/port.inc.php	(working copy)
@@ -374,19 +374,22 @@
       foreach ($int_links as $int_link)
       {
         $link_if  = get_port_by_id_cache($int_link);
-        $link_dev = device_by_id_cache($link_if['device_id']);
-        echo($br);
+        if (device_permitted($link_if['device_id']))
+        {
+          $link_dev = device_by_id_cache($link_if['device_id']);
+          echo($br);
 
-        if ($int_links_phys[$int_link]) { echo('<a alt="Directly connected" class="oicon-connect"></a> '); }
-        else { echo('<a alt="Same subnet" class="oicon-network-hub"></a> '); }
+          if ($int_links_phys[$int_link]) { echo('<a alt="Directly connected" class="oicon-connect"></a> '); }
+          else { echo('<a alt="Same subnet" class="oicon-network-hub"></a> '); }
 
-        echo("<b>" . generate_port_link($link_if, $link_if['port_label_short']) . " on " . generate_device_link($link_dev, short_hostname($link_dev['hostname'])) . "</b>");
+          echo("<b>" . generate_port_link($link_if, $link_if['port_label_short']) . " on " . generate_device_link($link_dev, short_hostname($link_dev['hostname'])) . "</b>");
 
-        ## FIXME -- do something fancy here.
+          ## FIXME -- do something fancy here.
 
-        if ($int_links_v6[$int_link]) { echo ' ', overlib_link('', '<span class="label label-success">IPv6</span>', implode("<br />", $int_links_v6[$int_link]), NULL); }
-        if ($int_links_v4[$int_link]) { echo ' ', overlib_link('', '<span class="label label-info">IPv4</span>', implode("<br />", $int_links_v4[$int_link]), NULL); }
-        $br = "<br />";
+          if ($int_links_v6[$int_link]) { echo ' ', overlib_link('', '<span class="label label-success">IPv6</span>', implode("<br />", $int_links_v6[$int_link]), NULL); }
+          if ($int_links_v4[$int_link]) { echo ' ', overlib_link('', '<span class="label label-info">IPv4</span>', implode("<br />", $int_links_v4[$int_link]), NULL); }
+          $br = "<br />";
+        }
       }
 
       // Output content of unknown links array (where ports don't exist in our database, or they weren't matched)