-
Notifications
You must be signed in to change notification settings - Fork 34
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
Enables IPv6 forwarding #323
Conversation
5a4e51c
to
8a48db4
Compare
SCR.Write( | ||
path(SYSCTL_IPV6_PATH), | ||
forward_ipv6 | ||
sysctl_val | ||
) | ||
SCR.Write(path(".etc.sysctl_conf"), nil) |
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.
this is not necessary as you write it with second call.
5772059
to
00ec4e4
Compare
00ec4e4
to
0863ec6
Compare
SYSCTL_IPV6_PATH = ".etc.sysctl_conf.\"net.ipv6.conf.all.forwarding\"" | ||
SYSCTL_AGENT_PATH = ".etc.sysctl_conf" | ||
SYSCTL_IPV4_PATH = "net.ipv4.ip_forward" | ||
SYSCTL_IPV6_PATH = "net.ipv6.conf.all.forwarding" |
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.
I think this is VERY confusing. How should I know which of these to use?
SCR.Read(path(SYSCTL_IPV6_PATH))
SCR.Read(path("#{SYSCTL_AGENT_PATH}.#{SYSCTL_IPV6_PATH}"))
SCR.Read(path("#{SYSCTL_AGENT_PATH}.\"#{SYSCTL_IPV6_PATH}\""))
Thinking of it, the best seems
SYSCTL_AGENT_PATH = path(".etc.sysctl_conf")
SYSCTL_IPV4_PATH = SYSCTL_AGENT_PATH + "net.ipv4.ip_forward" # add as a single path component
SYSCTL_IPV6_PATH = SYSCTL_AGENT_PATH + "net.ipv6.conf.all.forwarding"
...
SCR.Read(SYSCTL_IPV6_PATH)
(There is a difference between path(".foo") + ".bar.baz"
and path(".foo") + path(".bar.baz")
which I will need to document properly, Yast.Path#+
does not mention it)
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.
Oh, I see, SYSCTL_IPV9_PATH
are used as an argument to sysctl -w
. Then I'd use
# sysctl keys, used as *single* SCR path components below
IPV4_SYSCTL = "net.ipv4.ip_forward"
IPV6_SYSCTL = "net.ipv6.conf.all.forwarding"
# SCR paths
SYSCTL_AGENT_PATH = path(".etc.sysctl_conf")
SYSCTL_IPV4_PATH = SYSCTL_AGENT_PATH + IPV4_SYSCTL
SYSCTL_IPV6_PATH = SYSCTL_AGENT_PATH + IPV6_SYSCTL
LGTM, thank you! |
497f1d4
to
e726698
Compare
rebased, merging once travis is done. Thanks for reviews. |
bnc#916013