Skip to content

#1 add ip_bytes to Property for raw-byte IPv4 encoding#22

Open
bibonix wants to merge 1 commit into
APN-Network:masterfrom
bibonix:fix-property-ip-raw-bytes-1
Open

#1 add ip_bytes to Property for raw-byte IPv4 encoding#22
bibonix wants to merge 1 commit into
APN-Network:masterfrom
bibonix:fix-property-ip-raw-bytes-1

Conversation

@bibonix

@bibonix bibonix commented Jun 12, 2026

Copy link
Copy Markdown

Property.ip (field 4) encodes the backing Node's address as a dotted string, the only IPv4 field in the four proto files that does not use raw bytes. Peer.ip, Welcome.ip, and Welcome.home all use four raw bytes in network byte order. The inconsistency forces clients to switch between two representations when correlating Property entries with Peer entries and Ping.canaries keys.

This change adds bytes ip_bytes = 8 to the Property message, carrying the address in the same raw-byte encoding as Peer.ip. The existing string ip field (field 4) is marked deprecated in its comment; it stays on the wire until all consumers — iOS, Android, Huawei, and Node — have migrated to ip_bytes. At that point a follow-up commit can reserve field 4.

No build or test infrastructure is present in the repository (see issue #3), so wire-format correctness was verified by reading all four proto files and confirming that ip_bytes = 8 does not collide with any existing or reserved field number in the Property message.

Closes #1

Property.ip (field 4) encodes the backing Node's address as a dotted
string, inconsistent with Peer.ip and Welcome.ip which use four raw
bytes in network byte order. Adds bytes ip_bytes = 8 carrying the
same encoding as Peer.ip, marks string ip as deprecated pending
migration by all consumers.

Closes APN-Network#1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Property.ip uses dotted string while all other IPv4 fields use raw bytes

2 participants