mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-12 20:16:49 +02:00
routing.cgi: Allow adding static routes with subnet masks.
It was not possible to enter networks in the subnet mask notation, which is fixed by this patch. Fixes #10219.
This commit is contained in:
@@ -3,6 +3,7 @@ etc/system-release
|
||||
etc/issue
|
||||
srv/web/ipfire/cgi-bin/logs.cgi/calamaris.dat
|
||||
srv/web/ipfire/cgi-bin/ovpnmain.cgi
|
||||
srv/web/ipfire/cgi-bin/routing.cgi
|
||||
srv/web/ipfire/cgi-bin/vpnmain.cgi
|
||||
usr/sbin/ovpn-ccd-convert
|
||||
var/ipfire/general-functions.pl
|
||||
|
||||
@@ -118,6 +118,8 @@ if ($settings{'ACTION'} eq $Lang::tr{'toggle enable disable'}) {
|
||||
}
|
||||
|
||||
if ($settings{'ACTION'} eq $Lang::tr{'add'}) {
|
||||
# Convert subnet masks to CIDR notation.
|
||||
$settings{'IP'} = &General::iporsubtocidr($settings{'IP'});
|
||||
|
||||
# Validate inputs
|
||||
if (( !&General::validip($settings{'IP'})) and ( !&General::validipandmask($settings{'IP'}))){
|
||||
@@ -443,4 +445,4 @@ sub SortDataFile
|
||||
#
|
||||
sub BuildConfiguration {
|
||||
system '/usr/local/bin/rebuildroutes';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user