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

nrpe: allow ipv6 nagios servers addresses #722

Closed
wants to merge 1 commit into from
Closed

Conversation

vktg
Copy link
Contributor

@vktg vktg commented Dec 18, 2019

Redmine Issue: https://redmine.pfsense.org/issues/9973
Ready for review

Nagios NRPE package lacks IPv6 capabilities.

  1. binding IP: I can only give one IP. For Dual Stack I need to be able to give more than one IP - need additional changes, xinetd
  2. binding IP: I can only give IPv4 addresses, IPv6 address not accepted - it works
  3. nagios Servers: IPv6 addresses not accepted - fixed by this PR

@@ -247,7 +247,7 @@ function nrpe_custom_php_validation_command($post, &$input_errors) {
}
}
foreach (explode(",", $post['allowed_hosts']) as $host) {
if (!empty($host) && !is_ipaddr($host)) {
if (!empty($host) && !is_ipaddr($host) && !is_ipaddrv6($host)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is_ipaddr() matches both IPv4 and IPv6, so this change would not alter any behavior.

pfSense shell: $host = '10.0.0.1';
pfSense shell: var_dump( (!empty($host) && !is_ipaddr($host)) );
pfSense shell: exec
bool(false)
pfSense shell: var_dump( (!empty($host) && !is_ipaddr($host) && !is_ipaddrv6($host)) );
pfSense shell: exec
bool(false)
pfSense shell: $host = '2001:db8::1';
pfSense shell: var_dump( (!empty($host) && !is_ipaddr($host)) );
pfSense shell: exec
bool(false)
pfSense shell: var_dump( (!empty($host) && !is_ipaddr($host) && !is_ipaddrv6($host)) );
pfSense shell: exec
bool(false)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in this case we don't need this PR at all

@rbgarga rbgarga closed this Dec 20, 2019
netgate-git-updates pushed a commit that referenced this pull request Nov 27, 2021
Changelog:
	* Fixed: Version `Qt_5.15' not found (required by
	  /usr/bin/ksnip). (#712)
	* Fixed: CI packages show continuous suffix for tagged build.
	  (#710)
	* Fixed: kImageAnnotator not translated with deb package. (#359)
	* Fixed: Windows packages increased in size. (#713)
	* Fixed: The string 'Actions' is not available for translation.
	  (#729)
	* Fixed: HiDPI issue with multiple screen on Windows. (#668)
	* Fixed: Snipping Area not closing when pressing ESC. (#735)
	* Fixed: Sometimes "Snipping Area Rulers" not shown after
	  starting rectangular selection. (#684)
	* Fixed: Cursor not positioned correctly when snipping area
	  opens. (#736)
	* Fixed: Mouse cursor not captured when triggered via global
	  shortcut. (#737)
	* Fixed: Dual 4K screens get scrambled on X11. (#734)
	* Fixed: VCRUNTIME140_1.dll was not found. (#743)
	* Fixed: Screenshot area issue when monitor count changes on
	  Windows. (#722)
	* Fixed: Wayland does not support QWindow::requestActivate().
	  (#656)
	* Fixed: Wrong area is captured on a Wayland screen scaling.
	  (#691)
	* Changed: Enforce xdg-desktop-portal screenshots for Gnome >=
	  41. (#727)
	* Fixed kImageAnnotator: Crash while typing text on wayland.
	  (#256)
	* Changed kImageAnnotator: Show scrollbar when not all tools
	  visible. (#258)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants