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

bug (23.7r1): Call to undefined function legacy_interfaces_details() #6677

Closed
2 tasks done
g-a-c opened this issue Jul 21, 2023 · 1 comment
Closed
2 tasks done

bug (23.7r1): Call to undefined function legacy_interfaces_details() #6677

g-a-c opened this issue Jul 21, 2023 · 1 comment
Assignees
Labels
bug Production bug
Milestone

Comments

@g-a-c
Copy link

g-a-c commented Jul 21, 2023

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug

Since upgrading to 23.7-RC1 I have a reported crash once per minute which appears to be triggered by the default gateway_alert check in Monit:

[21-Jul-2023 08:40:28 Europe/London] Error: Call to undefined function legacy_interfaces_details() in /usr/local/etc/inc/plugins.inc.d/dpinger.inc:142
Stack trace:
#0 /usr/local/etc/inc/plugins.inc.d/dpinger.inc(353): dpinger_instances()
#1 /usr/local/etc/inc/plugins.inc(330): dpinger_status()
#2 /usr/local/etc/inc/legacy_bindings.inc(172): plugins_run('return_gateways...')
#3 /usr/local/opnsense/scripts/OPNsense/Monit/gateway_alert(52): return_gateways_status()
#4 {main}

To my PHP-naive mind it looks like dpinger.inc is missing a require_once 'interfaces.lib.inc; as this file is where the legacy_interfaces_details() function is actually defined. I did this on my appliance in an attempt to get rid of the errors and it did, but I'll leave it to the experts to decide whether that's the right solution or not.

Tip: to validate your setup was working with the previous version, use opnsense-revert (https://docs.opnsense.org/manual/opnsense_tools.html#opnsense-revert)

To Reproduce

Steps to reproduce the behavior:

  1. Install OPNsense 23.7r1
  2. Configure gateways with monitoring
  3. Install the os-monit plugin
  4. See error

Expected behavior

Errors do not happen

Describe alternatives you considered

A clear and concise description of any alternative solutions or workaround you considered.

Screenshots

If applicable, add screenshots to help explain your problem.

Relevant log files

If applicable, information from log files supporting your claim.

Additional context

Add any other context about the problem here.

Environment

Software version used and hardware type if relevant, e.g.:

OPNsense 23.7r1 (amd64, OpenSSL).
Atom C2558
Network Intel® I210

@fichtner fichtner self-assigned this Jul 21, 2023
@fichtner fichtner added the bug Production bug label Jul 21, 2023
@fichtner fichtner added this to the 23.7 milestone Jul 21, 2023
@fichtner
Copy link
Member

fichtner commented Jul 21, 2023

@g-a-c thanks! To avoid glueing all includes together the include/require should be in the top script, see 24f8eb6

# opnsense-patch 24f8eb6

Cheers,
Franco

fichtner added a commit that referenced this issue Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Production bug
Development

No branches or pull requests

2 participants