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

Standardise on netmask parameter, not net

parent 88a70d5b
......@@ -147,9 +147,6 @@ The IP address of the client. For IPv6, use `ipv6addr`. `ip` and `ip6` are mutu
##### `ip6`
The IPv6 address of the client. `ip` and `ip6` are mutually exclusive but one must be supplied. Default: `undef`.
##### `net`
The netmask of the client, specified as an integer, e.g. `24`. Default: `undef`.
##### `shortname`
A short alias that is used in place of the IP address or fully qualified hostname provided in the first line of the section. Required.
......
......@@ -4,7 +4,6 @@ define freeradius::client (
$secret,
$ip = undef,
$ip6 = undef,
$net = undef,
$virtual_server = undef,
$nastype = undef,
$netmask = undef,
......@@ -34,9 +33,9 @@ define freeradius::client (
proto => 'udp',
dport => $port,
action => 'accept',
source => $net ? {
source => $netmask ? {
undef => $ip,
default => "${ip}/${net}",
default => "${ip}/${netmask}",
},
}
} elsif $ip6 {
......@@ -45,9 +44,9 @@ define freeradius::client (
dport => $port,
action => 'accept',
provider => 'ip6tables',
source => $net ? {
source => $netmask ? {
undef => $ip6,
default => "${ip6}/${net}",
default => "${ip6}/${netmask}",
},
}
}
......
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