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,12 @@ func registerNode(
123123 var ips []string
124124 for _ , ip := range zosIps {
125125 ipV := net .IP (ip )
126- ips = append (ips , ipV .String ())
126+ s := ipV .String ()
127+ if net .ParseIP (s ) == nil {
128+ log .Warn ().Str ("ip" , s ).Msg ("skipping invalid IP from zos bridge" )
129+ continue
130+ }
131+ ips = append (ips , s )
127132 }
128133 return ips
129134 }(),
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,12 @@ 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+ s := ip .IP .String ()
126+ if net .ParseIP (s ) == nil {
127+ log .Warn ().Str ("ip" , s ).Msg ("skipping invalid IP from zos bridge" )
128+ continue
129+ }
130+ ips = append (ips , s )
126131 }
127132 return ips
128133 }(),
You can’t perform that action at this time.
0 commit comments