mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-24 01:42:58 +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:
@@ -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