File: 090_add-ubiquiti.patch

package info (click to toggle)
mrtg 2.17.10-13%2Bdeb13u1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 6,216 kB
  • sloc: perl: 25,746; ansic: 4,568; sh: 1,518; php: 227; awk: 225; makefile: 196; csh: 49; exp: 16
file content (31 lines) | stat: -rw-r--r-- 1,664 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Description: add ubiquiti as a vendor with its ID
Author: BaptisteRichard <b.richard@circle.dental>
Origin: https://github.com/oetiker/mrtg/pull/112
Reviewed-By: Joao Eriberto Mota Filho <eriberto@debian.org>
Last-Update: 2025-05-19
Index: mrtg/bin/cfgmaker
===================================================================
--- mrtg.orig/bin/cfgmaker
+++ mrtg/bin/cfgmaker
@@ -175,7 +175,7 @@ sub InterfaceInfo($$$$$) {
         push @Variables,  ($1 > 11.0 or $1 < 10.0 ) ? "ifAlias" : "CiscolocIfDescr";
         if ($1 > 11.2) {push @Variables, "vmVlan";};
        if ($1 > 11.3) {push @Variables, "vlanTrunkPortDynamicStatus";};
-    } elsif ( $routers->{$router}{deviceinfo}{Vendor} =~ /(?:hp|juniper|dlink|wwp|foundry|dellLan|force10|3com|extremenetworks|openBSD|arista|enterasys|zyxel|vyatta|dcn|brocade|datacom|alcatel|mikrotik|huawei|eltex)/i) {
+    } elsif ( $routers->{$router}{deviceinfo}{Vendor} =~ /(?:hp|juniper|dlink|wwp|foundry|dellLan|force10|3com|extremenetworks|openBSD|arista|enterasys|zyxel|vyatta|dcn|brocade|datacom|alcatel|mikrotik|huawei|eltex|ubiquiti)/i) {
         push @Variables, "ifAlias";
     }
 
@@ -1018,7 +1018,11 @@ sub DeviceInfo ($$$) {
             '1.3.6.1.4.1.14988.' =>     'mikrotik',
             '1.3.6.1.4.1.6486.' =>      'alcatel',
             '1.3.6.1.4.1.2011.' =>      'huawei',
-            '1.3.6.1.4.1.35265.' =>     'eltex'
+            '1.3.6.1.4.1.35265.' =>     'eltex',
+            '1.3.6.1.4.1.4413' =>       'ubiquiti',
+            '1.3.6.1.4.1.41112' =>      'ubiquiti'
+
+
         );
         $DevInfo{Vendor} = 'Unknown Vendor - '.$DevInfo{sysObjectID};
         foreach (keys %vendorIDs) {