-
-
Notifications
You must be signed in to change notification settings - Fork 792
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
added ip forwarding flag #115
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,11 @@ | |
include_recipe 'apt' | ||
package 'apt-transport-https' | ||
package 'bsdtar' | ||
sysctl_param 'net.ipv4.ip_forward' do | ||
value 1 | ||
only_if { node['platform'] == 'debian' } | ||
unless node['docker']['ip_forward'] == true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this does the opposite of what I'd expect this attribute to do: setting ip_forward to true would not enable IP forwarding. In any event, for conditionals surrounding a single resource, Chef convention is to use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're absolutely right, I wasn't sure if multiple conditions in the only_if were supported. |
||
sysctl_param 'net.ipv4.ip_forward' do | ||
value 1 | ||
only_if { node['platform'] == 'debian' } | ||
end | ||
end | ||
end | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about IPv6
net.ipv6.conf.all.forwarding
? I might be tempted to rename this to ipv4_forward. Or maybe not. I'm not sure. It should also control the behavior in at least the systemd service file, as it also sets ipv4.ip_forward.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I'll make this modification.