6 |
+ my %FDB; |
+ my %FDB; |
7 |
+ foreach my $proto ('TCP', 'UDP') { |
+ foreach my $proto ('TCP', 'UDP') { |
8 |
+ $FDB{$proto} = esmith::ConfigDB->open("portforward_" . lc($proto)) |
+ $FDB{$proto} = esmith::ConfigDB->open("portforward_" . lc($proto)) |
9 |
+ || die "Can't open portforward" . lc($proto) . " database: $!\n"; |
+ || esmith::ConfigDB->create("portforward_" . lc($proto)); |
10 |
+ |
+ |
11 |
+ my %rules = split ',', $DB->get_prop_and_delete('masq', "${proto}Forwards") |
+ my %rules = split ',', $DB->get_prop_and_delete('masq', "${proto}Forwards") |
12 |
+ || next; |
+ || next; |