Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,3 +209,9 @@ disable_monitor
Adds 'disable monitor' line - disables NTP Monlist command, useful to prevent NTP reflection attack https://isc.sans.edu/forums/diary/NTP+reflection+attack/17300

- *Default*: false

interface
Copy link
Owner

Choose a reason for hiding this comment

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

interfaces, plural.

---------------
Adds 'interface' line - interface configuration, see man ntp_misc
Copy link
Owner

Choose a reason for hiding this comment

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

Please not that this must be an array of strings and give an example.


- *Default*: 'UNSET'
1 change: 1 addition & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
$disable_monitor = true,
$sysconfig_path = 'USE_DEFAULTS',
$sysconfig_options = 'USE_DEFAULTS',
$interface = 'UNSET',
Copy link
Owner

Choose a reason for hiding this comment

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

instead of UNSET we could use {}

) {

# validate type as array or fail
Expand Down
7 changes: 6 additions & 1 deletion templates/ntp.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ filegen clockstats file clockstats type day enable
# pool: <http://www.pool.ntp.org/join.html>

<% @servers.each do |server| -%>
server <%= server %><% if @server_options != 'UNSET' %> <%= @server_options %><% end %>
server <%= server %><% if @server_options != 'UNSET' %> <% @server_options.each do |option| -%><%= option %><% end -%><% end %>
Copy link
Owner

Choose a reason for hiding this comment

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

This is separate from adding the interface parameter and should be in its own pull request.

I noticed you are using your master branch instead of creating a topic branch. Suggest creating a topic branch so this can be separate from the interface pull request (PR).

<% end -%>

<% if @my_peers != ['UNSET'] -%>
Expand Down Expand Up @@ -116,3 +116,8 @@ tinker panic 0
# Disabling monitor - https://isc.sans.edu/diary/NTP+reflection+attack/17300
disable monitor
<% end -%>

<% if @interface != 'UNSET' %>
# Interface configuration <% @interface.each do |value| %>
interface <%= value %><% end %>
<% end %>