top | item 45817198

(no title)

majke | 3 months ago

Falsehoods programmers think about addresses:

- parsing addresses is well defined (try parsing ::1%3)

- since 127.0.0.2 is on loopback, ::2 surely also would be

- interface number on Linux is unique

- unix domain socket names are zero-terminated (abstract are not)

- sin6_flowinfo matters (it doens;t unless you opt-in with setsockopt)

- sin6_scope_id matters (it doesn't unless on site-local range)

(I wonder if scope_id would work on ipv4-mapped-IPv6, but if I remember right I checked and it didn't)

- In ipv4, scope_id doesnt exist (true but it can be achieved by binding to interface)

and so on...

Years ago I tried to document all the quirks I knew about https://idea.popcount.org/2019-12-06-addressing/

discuss

order

namibj|3 months ago

It's sad that the only other loopback v6's appear to be v4's /8 in the form mapped into a slice of v7 address space

o11c|3 months ago

You can use ::ffff:127.0.0.2 for most purposes, but you can't ping it.

mananaysiempre|3 months ago

> you can't ping it

WTF?..

(My Linux machine can, but I’ve no clue if I should trust that now.)