Skip to content

Commit

Permalink
fix ordered serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
jrouzierinverse committed Jan 25, 2023
1 parent ff1ca45 commit 76720e4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sbin/pfconfig
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,16 @@ use pf::util::networking qw(send_data_with_length);
use Linux::Systemd::Daemon 'sd_ready';
use POSIX 'WNOHANG';
use pfconfig::git_storage;
use Tie::IxHash;

our $RUNNING = 1;

sub Tie::IxHash::TO_JSON {
my %hash;
@hash{@{$_[0][1]}} = @{$_[0][2]};
return \%hash;
}

## All pfconfig objects implementing TO_JSON must be imported here
use pfconfig::objects::NetAddr::IP;
use pfconfig::objects::Net::Netmask;
Expand Down

0 comments on commit 76720e4

Please sign in to comment.