Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

should not ping the internet by default #2

Closed
fichtner opened this issue Jan 3, 2015 · 0 comments
Closed

should not ping the internet by default #2

fichtner opened this issue Jan 3, 2015 · 0 comments
Assignees
Labels
feature Adding new functionality
Milestone

Comments

@fichtner
Copy link
Member

fichtner commented Jan 3, 2015

this revolves around the initial apinger setup. via @TimelessP (Twitter)

@fichtner fichtner self-assigned this Jan 3, 2015
@fichtner fichtner added this to the 15.7 milestone Jan 3, 2015
@fichtner fichtner added the feature Adding new functionality label Jan 11, 2015
@ghost ghost mentioned this issue Nov 13, 2017
knan-md added a commit to knan-md/opnsense-core that referenced this issue Mar 18, 2021
AdSchellevis added a commit that referenced this issue Jan 19, 2023
…n_array(): Argument #2 ($haystack) must be of type array, null given in /usr/local/www/vpn_ipsec_phase1.php:997
AdSchellevis added a commit that referenced this issue Jan 19, 2023
…n_array(): Argument #2 ($haystack) must be of type array, null given in /usr/local/www/vpn_ipsec_phase1.php:997
fichtner pushed a commit that referenced this issue Jan 19, 2023
…n_array(): Argument #2 ($haystack) must be of type array, null given in /usr/local/www/vpn_ipsec_phase1.php:997

(cherry picked from commit 473b106)
fichtner added a commit that referenced this issue Oct 29, 2023
When migrating Category this fails with an error:

 Fatal error: Uncaught Error: Call to undefined method OPNsense\Firewall\Category::flushCache() in /usr/local/opnsense/mvc/app/library/OPNsense/Firewall/Util.php:176
 Stack trace:
 #0 /usr/local/opnsense/mvc/app/models/OPNsense/Firewall/Migrations/M1_0_0.php(103): OPNsense\Firewall\Util::attachAliasObject(Object(OPNsense\Firewall\Category))
 #1 /usr/local/opnsense/mvc/app/models/OPNsense/Base/BaseModel.php(711): OPNsense\Firewall\Migrations\M1_0_0->run(Object(OPNsense\Firewall\Category))
 #2 /usr/core/src/opnsense/mvc/script/run_migrations.php(54): OPNsense\Base\BaseModel->runMigrations()
 #3 {main}
   thrown in /usr/local/opnsense/mvc/app/library/OPNsense/Firewall/Util.php on line 176
fichtner referenced this issue Nov 6, 2023
This commit moves the default logic into the model so we can reflect current values into virtual fields.
For all relevant "dpinger" fields, we reflect the current value in a field named current_$field, which means we can always query the active value without touching the stored one. Determination of current is as easy as `!empty(model_value) ? model_value : default`.

Refactor the dpinger process to use the current_ fields, since "dpinger_status()" retrieves all instances including the ones not stored, safeguard the config properties to exclude status determination (as loss and latency fields don't exist).

Previously the validation messages seemed to miss some gettext(), re-add these as well and cleanup validation. By calling isFieldChanged() on the array type, we know the gateway object has changed, but not exactly which field, this might lead to some noise, but if we implement a fix for #6978 , we should be able to avoid real issues with the bonus of needing less code.

The calculateCurrent() on the GatewayField ensures we can insert/update the current values after an update as these are nog aware of modifications automatically.

Finally, respect the 120 character screen limit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding new functionality
Development

No branches or pull requests

1 participant