# Return the error message if there was one.
return $error if($error);
}
+
+sub load_customsrvgrp ($) {
+ my ($group) = @_;
+
+ # Split the protocol from the given name.
+ my ($srvgrp, $proto) = split(/_/, $group);
+
+ # Abort if the protocol not set of not supported.
+ return "No proto" unless($proto);
+ return "Invalid proto $proto" unless(grep(lc($proto), @PROTOCOLS_WITH_PORTS));
+
+ # Get the assigned ports for the given service group name and the
+ # protocol.
+ my @data = &fwlib::get_custom_srvgrp_ports($srvgrp, $proto);
+
+ # Abort if there is no 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);
+}