Skip to content

support ipv6 gateway on cloud init VMs#507

Open
moracca wants to merge 2 commits intochurchers:masterfrom
moracca:patch-2
Open

support ipv6 gateway on cloud init VMs#507
moracca wants to merge 2 commits intochurchers:masterfrom
moracca:patch-2

Conversation

@moracca
Copy link
Contributor

@moracca moracca commented Apr 3, 2023

currently the network-config written for cloud init VMs is assuming that the gateway IP will be ipv4.

This commit simply checks if the IP contains a : and changes to using gateway6 key in the network-config in this case

I am not certain if there are other places that might break IPv6 usage, but this was one place that seemed like an easy fix.

currently the network-config written for cloud init VMs is assuming that the gateway IP will be ipv4.

This commit simply checks if the IP contains a `:` and changes to using gateway6 key in the network-config in this case
@ke5C2Fin
Copy link

ke5C2Fin commented Jul 6, 2023

Does this work for you?
lib/vm-core is #!/bin/sh and you can't use [[ ]] in /bin/sh, nor can use glob or regex * in [ ].
Maybe change your if line to if echo $_network_config_ipaddress | grep -sqF :; then?

@moracca
Copy link
Contributor Author

moracca commented Jul 7, 2023

Yes that should work fine. I've made that change. thanks!

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