Add the MTU when it's available
This doesn't work on 1.4, but I'm not Java-savvy enough to figure out how to only compile it for 1.4, so do a ghetto try-catch block in case the method doesn't exist.
This commit is contained in:
+5
@@ -24,6 +24,10 @@ public class stdapi_net_config_get_interfaces_V1_4 extends stdapi_net_config_get
|
||||
ifaceTLV.add(TLVType.TLV_TYPE_IP, new byte[4]);
|
||||
ifaceTLV.add(TLVType.TLV_TYPE_NETMASK, new byte[4]);
|
||||
}
|
||||
try {
|
||||
ifaceTLV.add(TLVType.TLV_TYPE_MTU, iface.getMTU());
|
||||
} catch (NoSuchMethodError e) { }
|
||||
|
||||
ifaceTLV.add(TLVType.TLV_TYPE_MAC_ADDRESS, info[2]);
|
||||
ifaceTLV.add(TLVType.TLV_TYPE_MAC_NAME, iface.getName() + " - " + iface.getDisplayName());
|
||||
response.addOverflow(TLVType.TLV_TYPE_NETWORK_INTERFACE, ifaceTLV);
|
||||
@@ -79,3 +83,4 @@ public class stdapi_net_config_get_interfaces_V1_4 extends stdapi_net_config_get
|
||||
return netmask;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user