Revision 4d7bdf64
Added by Viktor Gurov over 5 years ago
src/usr/local/www/services_router_advertisements.php | ||
---|---|---|
178 | 178 |
if (!is_numericint($_POST['raminrtradvinterval'])) { |
179 | 179 |
$input_errors[] = gettext("Minimum advertisement interval must be an integer."); |
180 | 180 |
} |
181 |
if ($_POST['raminrtradvinterval'] < "3") {
|
|
181 |
if ($_POST['raminrtradvinterval'] < 3) {
|
|
182 | 182 |
$input_errors[] = gettext("Minimum advertisement interval must be no less than 3."); |
183 | 183 |
} |
184 | 184 |
if ($_POST['ramaxrtradvinterval'] && $_POST['raminrtradvinterval'] > (0.75 * $_POST['ramaxrtradvinterval'])) { |
... | ... | |
189 | 189 |
if (!is_numericint($_POST['ramaxrtradvinterval'])) { |
190 | 190 |
$input_errors[] = gettext("Maximum advertisement interval must be an integer."); |
191 | 191 |
} |
192 |
if ($_POST['ramaxrtradvinterval'] < "4" || $_POST['ramaxrtradvinterval'] > "1800") {
|
|
192 |
if ($_POST['ramaxrtradvinterval'] < 4 || $_POST['ramaxrtradvinterval'] > 1800) {
|
|
193 | 193 |
$input_errors[] = gettext("Maximum advertisement interval must be no less than 4 and no greater than 1800."); |
194 | 194 |
} |
195 | 195 |
} |
196 |
if ($_POST['raadvdefaultlifetime'] && !is_numericint($_POST['raadvdefaultlifetime'])) {
|
|
197 |
$input_errors[] = gettext("Router lifetime must be an integer between 0 and 9000.");
|
|
196 |
if ($_POST['raadvdefaultlifetime'] && (($_POST['raadvdefaultlifetime'] < 1) || ($_POST['raadvdefaultlifetime'] > 9000))) {
|
|
197 |
$input_errors[] = gettext("Router lifetime must be an integer between 1 and 9000.");
|
|
198 | 198 |
} |
199 | 199 |
|
200 | 200 |
if (!$input_errors) { |
... | ... | |
352 | 352 |
'Default valid lifetime', |
353 | 353 |
'number', |
354 | 354 |
$pconfig['ravalidlifetime'], |
355 |
['min' => 1, 'max' => 655350] |
|
355 |
['min' => 1, 'max' => 655350, 'placeholder' => 86400]
|
|
356 | 356 |
))->setHelp('The length of time in seconds (relative to the time the packet is sent) that the prefix is valid for the purpose of on-link determination.%1$s' . |
357 | 357 |
'The default is 86400 seconds.', '<br />'); |
358 | 358 |
|
... | ... | |
360 | 360 |
'rapreferredlifetime', |
361 | 361 |
'Default preferred lifetime', |
362 | 362 |
'text', |
363 |
$pconfig['rapreferredlifetime'] |
|
363 |
$pconfig['rapreferredlifetime'], |
|
364 |
['placeholder' => 14400] |
|
364 | 365 |
))->setHelp('Seconds. The length of time in seconds (relative to the time the packet is sent) that addresses generated from the prefix via stateless address autoconfiguration remain preferred.%1$s' . |
365 | 366 |
'The default is 14400 seconds.', '<br />'); |
366 | 367 |
|
... | ... | |
369 | 370 |
'Minimum RA interval', |
370 | 371 |
'number', |
371 | 372 |
$pconfig['raminrtradvinterval'], |
372 |
['min' => 3, 'max' => 1350] |
|
373 |
))->setHelp('The minimum time allowed between sending unsolicited multicast router advertisements in seconds.'); |
|
373 |
['min' => 3, 'max' => 1350, 'placeholder' => 5] |
|
374 |
))->setHelp('The minimum time allowed between sending unsolicited multicast router advertisements in seconds.%1$s' . |
|
375 |
'The default is 5 seconds.', '<br />'); |
|
374 | 376 |
|
375 | 377 |
$section->addInput(new Form_Input( |
376 | 378 |
'ramaxrtradvinterval', |
377 | 379 |
'Maximum RA interval', |
378 | 380 |
'number', |
379 | 381 |
$pconfig['ramaxrtradvinterval'], |
380 |
['min' => 4, 'max' => 1800] |
|
381 |
))->setHelp('The maximum time allowed between sending unsolicited multicast router advertisements in seconds.'); |
|
382 |
['min' => 4, 'max' => 1800, 'placeholder' => 20] |
|
383 |
))->setHelp('The maximum time allowed between sending unsolicited multicast router advertisements in seconds.%1$s' . |
|
384 |
'The default is 20 seconds.', '<br />'); |
|
382 | 385 |
|
383 | 386 |
$section->addInput(new Form_Input( |
384 | 387 |
'raadvdefaultlifetime', |
385 | 388 |
'Router lifetime', |
386 | 389 |
'number', |
387 | 390 |
$pconfig['raadvdefaultlifetime'], |
388 |
['min' => 0, 'max' => 9000] |
|
389 |
))->setHelp('The lifetime associated with the default router in seconds.'); |
|
391 |
['min' => 1, 'max' => 9000] |
|
392 |
))->setHelp('The lifetime associated with the default router in seconds.%1$s' . |
|
393 |
'The default is 3 * Maximim RA interval seconds.', '<br />'); |
|
390 | 394 |
|
391 | 395 |
$section->addInput(new Form_StaticText( |
392 | 396 |
'RA Subnets', |
Also available in: Unified diff
DHCPv6 RA show default values in certain fields. Issue #10448