diff --git a/python/nav/web/info/room/views.py b/python/nav/web/info/room/views.py index 4a1b7934a7..e2f61e864c 100644 --- a/python/nav/web/info/room/views.py +++ b/python/nav/web/info/room/views.py @@ -51,6 +51,13 @@ RACK_CENTER: 'center', RACK_RIGHT: 'right', } +# See section 3.2.4 of RFC 3635: +ETHERNET_INTERFACE_TYPES = ( + 6, # ethernetCsmacd + 62, # fastEther + 69, # fastEtherFX + 117, # gigabitEthernet +) _logger = logging.getLogger('nav.web.info.room') @@ -217,7 +224,7 @@ def render_netboxes(request, roomid): # Filter interfaces on iftype and add fast last_cam lookup for netbox in netboxes: netbox.interfaces = ( - netbox.interface_set.filter(iftype=6) + netbox.interface_set.filter(iftype__in=ETHERNET_INTERFACE_TYPES) .order_by("ifindex") .extra(select=cam_query) )