From 027042901ae820a9fd226466869ff0834e051428 Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Thu, 26 Nov 2015 15:19:54 +0100 Subject: [PATCH] + Fix #221 (Thanks targuan!) --- snmp_standard/mode/interfaces.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/snmp_standard/mode/interfaces.pm b/snmp_standard/mode/interfaces.pm index 08467699e..875647532 100644 --- a/snmp_standard/mode/interfaces.pm +++ b/snmp_standard/mode/interfaces.pm @@ -1217,6 +1217,10 @@ sub add_result_cast { } } + foreach (('iucast', 'imcast', 'ibcast', 'oucast', 'omcast', 'omcast')) { + $self->{interface_selected}->{$_} = 0 if (!defined($self->{interface_selected}->{$_})); + } + $self->{interface_selected}->{$options{instance}}->{total_in_packets} = $self->{interface_selected}->{$options{instance}}->{iucast} + $self->{interface_selected}->{$options{instance}}->{imcast} + $self->{interface_selected}->{$options{instance}}->{ibcast}; $self->{interface_selected}->{$options{instance}}->{total_out_packets} = $self->{interface_selected}->{$options{instance}}->{oucast} + $self->{interface_selected}->{$options{instance}}->{omcast} + $self->{interface_selected}->{$options{instance}}->{obcast}; }