<!-- XE-13287 · [net/gossip_score.go] M1: privateIPNets() tidak lengkap — IP colocation detection tidak accurate · testnet -->
*Markdown view of <https://bounty.xe.network/XE-13287>. The page is the record; this is the same page for reading.*

XE-13287 · Bounty

# \[net/gossip\_score.go\] M1: privateIPNets() tidak lengkap — IP colocation detection tidak accurate

Closed · invalid
—
[xe#432](https://github.com/xeprotocol/xe/issues/432)
filed 2026-11-12 02:50 UTC
by wahyu20260100233-ops

Verdict
:   Invalid

Tier
:   —

Claimed
:   —

Area
:   P2P / sync

Duplicate of
:   —

Tracked
:   —

Updated
:   2026-11-20 00:51 UTC

Told
:   2026-11-20 00:49 UTC

### Patches

None linked.

### History

- [557242](https://bounty.xe.network/log/557242) 2026-11-20 00:49 UTC reply.mirrored
- [557052](https://bounty.xe.network/log/557052) 2026-11-20 00:48 UTC reply.sent
- [554201](https://bounty.xe.network/log/554201) 2026-11-20 00:36 UTC github.state\_pushed
- [554197](https://bounty.xe.network/log/554197) 2026-11-20 00:36 UTC github.labels
- [553325](https://bounty.xe.network/log/553325) 2026-11-20 00:33 UTC proposal.adopted
- [553108](https://bounty.xe.network/log/553108) 2026-11-20 00:33 UTC proposal.adopted
- [553107](https://bounty.xe.network/log/553107) 2026-11-20 00:33 UTC ticket.status new → closed
- [552490](https://bounty.xe.network/log/552490) 2026-11-20 00:33 UTC proposal.adopted
- [552489](https://bounty.xe.network/log/552489) 2026-11-20 00:33 UTC ticket.facts area
- [552485](https://bounty.xe.network/log/552485) 2026-11-20 00:33 UTC proposal.adopted
- [552484](https://bounty.xe.network/log/552484) 2026-11-20 00:33 UTC ticket.facts
- [551150](https://bounty.xe.network/log/551150) 2026-11-20 00:31 UTC note.added

[Full history](https://bounty.xe.network/log?ref=XE-13287) · [JSON](https://bounty.xe.network/v1/tickets/XE-13287) · [markdown](https://bounty.xe.network/XE-13287.md)

### Report

## Ringkasan

Hanya cover: `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`, `169.254.0.0/16`, `100.64.0.0/10`, `fd00::/8`, `fe80::/10`.

Missing: `0.0.0.0/8`, `192.0.0.0/24`, `192.0.2.0/24` (TEST-NET-1), `198.18.0.0/15` (benchmarking), `198.51.100.0/24` (TEST-NET-2), `203.0.113.0/24` (TEST-NET-3), `224.0.0.0/4` (multicast), `240.0.0.0/4` (reserved), `255.255.255.255/32`.

## Lokasi

- File: `net/gossip_score.go`
- Lines: 119-139

## Kode

```
func privateIPNets() []netip.Prefix {
    return []netip.Prefix{
        netip.MustParsePrefix("10.0.0.0/8"),
        netip.MustParsePrefix("172.16.0.0/12"),
        netip.MustParsePrefix("192.168.0.0/16"),
        netip.MustParsePrefix("169.254.0.0/16"),
        netip.MustParsePrefix("100.64.0.0/10"),
        netip.MustParsePrefix("fd00::/8"),
        netip.MustParsePrefix("fe80::/10"),
    }
}
```

## Impact

IP colocation detection tidak accurate. Peer dengan IP di range yang tidak tercover dianggap bukan private, padahal seharusnya.

## Suggested Fix

```
func privateIPNets() []netip.Prefix {
    return []netip.Prefix{
        netip.MustParsePrefix("0.0.0.0/8"),
        netip.MustParsePrefix("10.0.0.0/8"),
        netip.MustParsePrefix("100.64.0.0/10"),
        netip.MustParsePrefix("127.0.0.0/8"),
        netip.MustParsePrefix("169.254.0.0/16"),
        netip.MustParsePrefix("172.16.0.0/12"),
        netip.MustParsePrefix("192.0.0.0/24"),
        netip.MustParsePrefix("192.0.2.0/24"),
        netip.MustParsePrefix("192.168.0.0/16"),
        netip.MustParsePrefix("198.18.0.0/15"),
        netip.MustParsePrefix("198.51.100.0/24"),
        netip.MustParsePrefix("203.0.113.0/24"),
        netip.MustParsePrefix("224.0.0.0/4"),
        netip.MustParsePrefix("240.0.0.0/4"),
        netip.MustParsePrefix("255.255.255.255/32"),
        netip.MustParsePrefix("fc00::/7"),
        netip.MustParsePrefix("fd00::/8"),
        netip.MustParsePrefix("fe80::/10"),
    }
}
```

Atau gunakan library yang sudah maintain, misal `github.com/libp2p/go-netroute` atau `github.com/jimstudt/netutil`.

### Thread

**XE desk**team2026-11-20 00:49 UTCgithub

Thanks for the report. We read it against the code and could not confirm a bug in what it describes.

This report is closed as invalid. If we have missed something, file a new report that links
https://bounty.xe.network/XE-13287 and says what; it is read like any other.
