]> git.ipfire.org Git - people/stevee/ipfire-2.x.git/commitdiff
general-functions.pl: Drop ipcidr() and ipcidr2msk() functions.
authorStefan Schantl <stefan.schantl@ipfire.org>
Sun, 18 Jul 2021 09:33:04 +0000 (11:33 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Sun, 18 Jul 2021 09:33:04 +0000 (11:33 +0200)
These functions have been replaced by the
Network::convert_to_cidr_or_subnet() function.

Also drop the usage of the Net::IPv4Addr perl module, which is
not needed anymore.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
config/cfgroot/general-functions.pl

index 550afcf827b4b5a50c49e99a15593a8c2de6f619..f2313fb43f75909b79eac33ba829491472a72920 100644 (file)
@@ -18,7 +18,6 @@ use strict;
 use Socket;
 use IO::Socket;
 use Net::SSLeay;
-use Net::IPv4Addr qw(:all);
 $|=1; # line buffering
 
 $General::version = 'VERSION';
@@ -838,17 +837,6 @@ sub NextIP2 {
        return &Network::find_next_ip_address(shift, 4);
 }
 
-sub ipcidr {
-       my ($ip,$cidr) = &Net::IPv4Addr::ipv4_parse(shift);
-       return "$ip\/$cidr";
-}
-
-sub ipcidr2msk {
-       my ($ip,$cidr) = &Net::IPv4Addr::ipv4_parse(shift);
-       my $netmask = &Net::IPv4Addr::ipv4_cidr2msk($cidr);
-       return "$ip\/$netmask";
-}
-
 sub validemail {
     my $address = shift;
     my @parts = split( /\@/, $address );