Skip to content

Commit

Permalink
[dns] Fix for Invalid IP4 Address
Browse files Browse the repository at this point in the history
Signed-off-by: hfuss <[email protected]>
  • Loading branch information
onelapahead committed Nov 9, 2023
1 parent cfc1538 commit baa233e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/events/eventstream.go
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,8 @@ func (a *eventStream) performActionWithRetry(batchNumber uint64, events []*event
func (a *eventStream) isAddressUnsafe(ip *net.IPAddr) bool {
ip4 := ip.IP.To4()
return !a.allowPrivateIPs &&
(ip4[0] == 0 ||
(len(ip4) < 1 ||
ip4[0] == 0 ||
ip4[0] >= 224 ||
ip4[0] == 127 ||
ip4[0] == 10 ||
Expand Down

0 comments on commit baa233e

Please sign in to comment.