Commit c3e3983f authored by Jonathan Gazeley's avatar Jonathan Gazeley
Browse files

Move all FR3 version checks to one global one

parent 2b11fe42
......@@ -17,7 +17,6 @@ define freeradius::client (
$fr_service = $::freeradius::params::fr_service
$fr_basepath = $::freeradius::params::fr_basepath
$fr_group = $::freeradius::params::fr_group
$fr_version = $::freeradius::params::fr_version
# Calculate CIDR format IP now that FreeRADIUS has obsoleted use of separate netmask.
# This workaround means no syntax change is necessary, although we print a warning.
......@@ -30,7 +29,7 @@ define freeradius::client (
default => "${ip6}/${netmask}",
}
if ($netmask and $fr_version == 3) {
if ($netmask) {
warning("netmask field found in client ${shortname} is deprecated, use CIDR notation instead. Please fix your configuration.")
}
......
......@@ -12,6 +12,10 @@ class freeradius (
$syslog = false,
) inherits freeradius::params {
if ($fr_version != 3) {
fail('This module is only compatible with FreeRADIUS 3')
}
if $control_socket == true {
warning('Use of the control_socket parameter in the freeradius class is deprecated. Please use the freeradius::control_socket class instead.')
}
......
......@@ -12,7 +12,6 @@ define freeradius::statusclient (
$fr_service = $::freeradius::params::fr_service
$fr_basepath = $::freeradius::params::fr_basepath
$fr_group = $::freeradius::params::fr_group
$fr_version = $::freeradius::params::fr_version
$cidr = $netmask ? {
undef => $ip,
......@@ -23,7 +22,7 @@ define freeradius::statusclient (
default => "${ip6}/${netmask}",
}
if ($netmask and $fr_version == 3) {
if ($netmask) {
warning("netmask field found in client ${shortname} is deprecated, use CIDR notation instead. Please fix your configuration.")
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment