Subject: | delete_entry modifies its arguments in a strange way |
The following perl script
[code]
use strict;
use warnings;
use IPTables::IPv4;
use Data::Dumper;
my $rule = {
protocol => "tcp",
source => "127.0.0.1",
pcnt => 0,
"destination-port" => "www:ircd",
jump => "ACCEPT",
bcnt => "0"
};
my $table = IPTables::IPv4::init("filter");
$table->delete_entry("INPUT", $rule);
print Dumper($rule);
[/code]
outputs:
[code]
$VAR1 = {
'source' => '127.0.0.1',
'protocol' => 'tcp',
'pcnt' => 0,
'destination-port' => ':ww:ircd',
'jump' => 'ACCEPT',
'bcnt' => '0'
};
[/code]
Note that the destination-port value is broken. This was reproducible each time I tried, regardless whether a matching rule exists or not.
I suggest that delete_entry should be modified in a way that it does not touch its arguments.
Thank you,
Christoph Bussenius
(My system is Linux 2.6.3-gentoo-r1, perl v5.8.4 built for i686-linux-thread-multi)