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

allow port to be customized in dns::server::options #72

Merged
merged 4 commits into from
Jan 27, 2015
Merged

allow port to be customized in dns::server::options #72

merged 4 commits into from
Jan 27, 2015

Conversation

talisto
Copy link
Contributor

@talisto talisto commented Jan 26, 2015

I've added a $listen_on_port option to dns::server::options to allow the port to be customized. Rspec tests included.

@@ -22,9 +22,9 @@ options {
<% end -%>

<% if @listen_on.size == 0 then -%>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm, my only problem here is this gate. You can't set the port without setting a listen_on?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm ok with that I guess, as long as it is documented.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, the port can only be specified in the listen-on statement. See here: http://docstore.mik.ua/orelly/networking_2ndEd/dns/ch10_15.htm

My other thought was to allow a hash for the $listen_on argument, like so:

$listen_on = {
'10.0.0.10' => 5300
}

..since in BIND 9 you can actually set the port on a per IP basis, but there'd still need to be a $listen_on_port option for when no $listen_on addresses are defined (i.e. any).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh, I just looked at the official docs and there actually is a port option, separate from the listen-on option. I'll update the template to use that instead.

@solarkennedy
Copy link
Collaborator

Great!

solarkennedy added a commit that referenced this pull request Jan 27, 2015
allow port to be customized in dns::server::options
@solarkennedy solarkennedy merged commit 76669e8 into ajjahn:master Jan 27, 2015
@talisto talisto deleted the listen-on-port branch January 27, 2015 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants