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

support ipv6 network #842

Merged
merged 1 commit into from
May 27, 2022
Merged

support ipv6 network #842

merged 1 commit into from
May 27, 2022

Conversation

tydra-wang
Copy link
Member

@tydra-wang tydra-wang commented May 20, 2022

What type of PR is this?

/kind enhancement

What this PR does / why we need it:

We need to run openyurt on ipv6 network.

Current works makes yurt-tunnel and yurthub work well on ipv6 network.

  • yurt-tunnel-server

    • determine protocol stack according to bind ip format
    • set default insecure bind address to ::1 when ipv6
    • use ip6tables instead of iptables when ipv6
  • yurt-tunnel-agent

    • determine protocol stack according to node ip format
    • set default meta host to ::1 when ipv6
  • yurthub

    • use fd00::2:1 as the default dummy if ip when binding an ipv6 address(yurthub still use 127.0.0.1 as default, set --bind-address to ::1 in ipv6 )
    • use ip6tables instead iptables when dummy ip is an ipv6 address

    use fd00::2:1 in ipv6, as the counterpart of 169.254.2.1 in ipv4, referring to node local dns cache ipv6 configuration.

  • other changes:

    • use net.JoinHostPort instead of fmt.Sprintf("%s:%d", host, port)
    • use ::1 as loopback address when ipv6
    • add ::1 to cert SANs

@openyurt-bot
Copy link
Collaborator

Welcome @tydra-wang! It looks like this is your first PR to openyurtio/openyurt 🎉

@openyurt-bot openyurt-bot added the size/L size/L: 100-499 label May 20, 2022
@rambohe-ch
Copy link
Member

@tydra-wang Very appreciate you for raising pull request to support IPV6 for OpenYurt. please fix golangci lint error. and you can run make lint locally to check the errors.

@tydra-wang tydra-wang force-pushed the ipv6 branch 4 times, most recently from 25435d1 to 20e67d0 Compare May 20, 2022 07:55
@tydra-wang
Copy link
Member Author

make lint succeeded in my local env, while workflow still failed. I didn't see any specified files in the workflow log.

@tydra-wang tydra-wang force-pushed the ipv6 branch 2 times, most recently from 5e6e0c8 to cfe0d6e Compare May 24, 2022 12:18
@rambohe-ch
Copy link
Member

@tydra-wang please rebase the newest master branch, and fix the conflicts.

@tydra-wang tydra-wang force-pushed the ipv6 branch 4 times, most recently from 483bf62 to 309bfd9 Compare May 26, 2022 02:13
@openyurt-bot openyurt-bot added the approved approved label May 27, 2022
@rambohe-ch
Copy link
Member

/lgtm
/approve

@openyurt-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rambohe-ch, tydra-wang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rambohe-ch rambohe-ch merged commit bebc037 into openyurtio:master May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved approved kind/enhancement kind/enhancement lgtm lgtm size/L size/L: 100-499
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants