mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +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
|
etc/issue
|
||||||
srv/web/ipfire/cgi-bin/logs.cgi/calamaris.dat
|
srv/web/ipfire/cgi-bin/logs.cgi/calamaris.dat
|
||||||
srv/web/ipfire/cgi-bin/ovpnmain.cgi
|
srv/web/ipfire/cgi-bin/ovpnmain.cgi
|
||||||
|
srv/web/ipfire/cgi-bin/routing.cgi
|
||||||
srv/web/ipfire/cgi-bin/vpnmain.cgi
|
srv/web/ipfire/cgi-bin/vpnmain.cgi
|
||||||
usr/sbin/ovpn-ccd-convert
|
usr/sbin/ovpn-ccd-convert
|
||||||
var/ipfire/general-functions.pl
|
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'}) {
|
if ($settings{'ACTION'} eq $Lang::tr{'add'}) {
|
||||||
|
# Convert subnet masks to CIDR notation.
|
||||||
|
$settings{'IP'} = &General::iporsubtocidr($settings{'IP'});
|
||||||
|
|
||||||
# Validate inputs
|
# Validate inputs
|
||||||
if (( !&General::validip($settings{'IP'})) and ( !&General::validipandmask($settings{'IP'}))){
|
if (( !&General::validip($settings{'IP'})) and ( !&General::validipandmask($settings{'IP'}))){
|
||||||
@@ -443,4 +445,4 @@ sub SortDataFile
|
|||||||
#
|
#
|
||||||
sub BuildConfiguration {
|
sub BuildConfiguration {
|
||||||
system '/usr/local/bin/rebuildroutes';
|
system '/usr/local/bin/rebuildroutes';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user