This function is used to perfom as loader for custom
host/newtworks groups.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
return $set_loader{$element};
}
+
+sub load_customgrp ($) {
+ my ($group) = @_;
+
+ # Get the assigned host/network addresses for the given group.
+ my @data = &fwlib::get_custom_group_addresses($group);
+
+ # Abort if there is not data.
+ return "No data" unless(@data);
+
+ # Call the ipset_load_set function to load the set.
+ my $error = &IPSet::Functions::ipset_load_set($group, @data);
+
+ # Return the error message if there was one.
+ return $error if($error);
+}