Skip to content

Commit

Permalink
fix matching ip address with gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
sameh-farouk committed May 28, 2024
1 parent 05ea7d3 commit 95a25fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mappings/farms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function checkIPs(ctx: Ctx, ipv4_a: string, ipv4_b: string): boolean {
const ip_b = ipaddr.parse(ipv4_b);

// check if both IP addresses are the same
if (ip_a[0] == ip_b) {
if (ip_a[0].toString() == ip_b.toString()) {
ctx.log.warn(`The IP addresses are the same. Public IP: ${ipv4_a}, Gateway: ${ipv4_b}`);
return false;
}
Expand Down

0 comments on commit 95a25fa

Please sign in to comment.