File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,7 +123,15 @@ func registerNode(
123123 var ips []string
124124 for _ , ip := range zosIps {
125125 ipV := net .IP (ip )
126- ips = append (ips , ipV .String ())
126+ if len (ipV ) == 0 {
127+ continue
128+ }
129+ s := ipV .String ()
130+ if net .ParseIP (s ) == nil {
131+ log .Warn ().Str ("ip" , s ).Msg ("skipping invalid IP from zos bridge" )
132+ continue
133+ }
134+ ips = append (ips , s )
127135 }
128136 return ips
129137 }(),
Original file line number Diff line number Diff line change 44 "context"
55 "crypto/ed25519"
66 "fmt"
7+ "net"
78 "time"
89
910 "github.com/centrifuge/go-substrate-rpc-client/v4/types"
@@ -121,8 +122,15 @@ func registerNode(
121122 IPs : func () []string {
122123 ips := make ([]string , 0 )
123124 for _ , ip := range infs .Interfaces ["zos" ].IPs {
124-
125- ips = append (ips , ip .IP .String ())
125+ if len (ip .IP ) == 0 {
126+ continue
127+ }
128+ s := ip .IP .String ()
129+ if net .ParseIP (s ) == nil {
130+ log .Warn ().Str ("ip" , s ).Msg ("skipping invalid IP from zos bridge" )
131+ continue
132+ }
133+ ips = append (ips , s )
126134 }
127135 return ips
128136 }(),
You can’t perform that action at this time.
0 commit comments