Skip to content

Commit 5402d8c

Browse files
committed
Warn on start and save config if IPv6 is enabled but no public IPv6 is found
1 parent fc5196c commit 5402d8c

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

rocketpool-cli/service/service.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,12 @@ func configureService(configPath string, isNative, yes bool, composeFiles []stri
328328
})
329329
}
330330

331+
// Warn if IPv6 is enabled but no public IPv6 address is available
332+
if md.Config.IsIPv6Enabled() && md.Config.GetExternalIpv6() == "" {
333+
color.YellowPrintln("Warning: IPv6 is enabled but no public IPv6 address was detected. Your node will not be reachable by IPv6 peers.")
334+
fmt.Println()
335+
}
336+
331337
// Query for service start if this is old and there are containers to change
332338
if len(md.ContainersToRestart) > 0 {
333339
fmt.Println("The following containers must be restarted for the changes to take effect:")
@@ -520,6 +526,12 @@ func startService(params startServiceParams) error {
520526
return fmt.Errorf("No configuration detected. Please run `rocketpool service config` to set up your Smart Node before running it.")
521527
}
522528

529+
// Warn if IPv6 is enabled but no public IPv6 address is available
530+
if cfg.IsIPv6Enabled() && cfg.GetExternalIpv6() == "" {
531+
color.YellowPrintln("Warning: IPv6 is enabled but no public IPv6 address was detected. Your node will not be reachable by IPv6 peers.")
532+
fmt.Println()
533+
}
534+
523535
// Check if this is a new install
524536
isUpdate, err := rp.IsFirstRun()
525537
if err != nil {

0 commit comments

Comments
 (0)