fix ipsec tunnel (#2286)

This commit is contained in:
qgarnier 2020-10-27 08:53:53 +01:00 committed by GitHub
parent 7cca312032
commit 26196daec6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -130,6 +130,11 @@ sub custom_traffic_output {
sub custom_traffic_calc {
my ($self, %options) = @_;
if (!defined($options{old_datas}->{$self->{instance} . '_' . $options{extra_options}->{label_ref}})) {
$self->{error_msg} = "Buffer creation";
return -1;
}
my $total_bytes = 0;
foreach (keys %{$options{new_datas}}) {
if (/$self->{instance}_cipSecTunHc$options{extra_options}->{label_ref}Octets_(\d+)/) {
@ -191,6 +196,11 @@ sub custom_drop_output {
sub custom_drop_calc {
my ($self, %options) = @_;
if (!defined($options{old_datas}->{$self->{instance} . '_' . $options{extra_options}->{label_ref}})) {
$self->{error_msg} = "Buffer creation";
return -1;
}
my $total_pkts = 0;
foreach (keys %{$options{new_datas}}) {
if (/$self->{instance}_cipSecTun$options{extra_options}->{label_ref}DropPkts_(\d+)/) {