mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Fixed #9586 by detecting if option list includes /0 or not
(cherry picked from commit 7ec80e763f)
This commit is contained in:
parent
2c29eaf921
commit
aa08527dc9
@ -184,7 +184,14 @@ function setMasks() {
|
||||
if (input.val() == "")
|
||||
return;
|
||||
|
||||
while (select.options.length > max)
|
||||
// Sometimes the mask includes '0' (e.g. for VPNs), sometimes it does not
|
||||
if (select.options[select.options.length - 1].value == 0) {
|
||||
var mm = max + 1;
|
||||
} else {
|
||||
var mm = max;
|
||||
}
|
||||
|
||||
while (select.options.length > mm)
|
||||
select.remove(0);
|
||||
|
||||
if (select.options.length < max) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user