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

Enables IPv6 forwarding #323

Merged
merged 10 commits into from
Aug 5, 2015
Merged

Enables IPv6 forwarding #323

merged 10 commits into from
Aug 5, 2015

Conversation

mchf
Copy link
Member

@mchf mchf commented Jul 23, 2015

bnc#916013

SCR.Write(
path(SYSCTL_IPV6_PATH),
forward_ipv6
sysctl_val
)
SCR.Write(path(".etc.sysctl_conf"), nil)
Copy link
Member

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.

@mchf mchf force-pushed the bnc916013-ipv6-firewall branch 2 times, most recently from 5772059 to 00ec4e4 Compare August 5, 2015 08:14
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"
Copy link
Member

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)

Copy link
Member

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

@mvidner
Copy link
Member

mvidner commented Aug 5, 2015

LGTM, thank you!

@mchf
Copy link
Member Author

mchf commented Aug 5, 2015

rebased, merging once travis is done. Thanks for reviews.

mchf added a commit that referenced this pull request Aug 5, 2015
@mchf mchf merged commit b29678f into yast:master Aug 5, 2015
@mchf mchf deleted the bnc916013-ipv6-firewall branch August 5, 2015 15:12
@mchf mchf mentioned this pull request Aug 17, 2015
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.

None yet

3 participants