Skip to content

Commit c9e2e79

Browse files
committed
Fix maverick_network AP parameters, #445
1 parent 228c5a9 commit c9e2e79

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

manifests/maverick-modules/maverick_network/manifests/init.pp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,12 @@
259259
$ssid = undef,
260260
$psk = undef,
261261
$dhcp_range = undef,
262+
$driver = "nl80211",
263+
$channel = undef,
264+
$hw_mode = "g",
265+
$disable_broadcast_ssid = false,
266+
$dhcp_range = "192.168.10.10,192.168.10.50",
267+
$dhcp_leasetime = "24h",
262268
) {
263269
# If the mac address is specified, then set the interface name statically in udev
264270
if $macaddress {
@@ -290,10 +296,20 @@
290296
addressing => "master",
291297
macaddress => $macaddress,
292298
ipaddress => $apaddress,
299+
gateway => $gateway,
300+
nameservers => $nameservers,
293301
}
294302
# Then setup the AP
295303
maverick_network::interface_ap { $name:
296304
macaddress => $macaddress,
305+
ssid => $ssid,
306+
psk => $psk,
307+
driver => $driver,
308+
channel => $channel,
309+
hw_mode => $hw_mode,
310+
disable_broadcast_ssid => $disable_broadcast_ssid,
311+
dhcp_range => $dhcp_range,
312+
dhcp_leasetime => $dhcp_leasetime,
297313
}
298314
}
299315
# If not defined as monitor mode, ensure monitor disabled for this interface

manifests/maverick-modules/maverick_network/manifests/interface_ap.pp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
define maverick_network::interface_ap (
22
$macaddress = undef,
33
$ssid = "Maverick",
4+
$psk = "8097a204e44b0a740d5daad37d0e34ac16e4df353bc827dcd57d49b36d49740d",
45
$driver = "nl80211",
56
$channel = 1,
67
$hw_mode = "g",
@@ -50,4 +51,4 @@
5051
content => template('maverick_network/dnsmasq-dhcp.erb'),
5152
}
5253

53-
}
54+
}

manifests/maverick-modules/maverick_network/templates/hostapd.conf.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ auth_algs=1
1818
#1 - wpa only
1919
#2 - wpa2 only
2020
#3 - both
21-
wpa=3
21+
wpa=2
2222
#sets wpa passphrase required by the clients to authenticate themselves on the network
23-
wpa_passphrase=ifeeltheneed
23+
wpa_psk=<%= @psk %>
2424
#sets wpa key management
2525
wpa_key_mgmt=WPA-PSK
2626
#sets encryption used by WPA
27-
wpa_pairwise=TKIP
27+
wpa_pairwise=TKIP CCMP
2828
#sets encryption used by WPA2
2929
rsn_pairwise=CCMP

0 commit comments

Comments
 (0)