[<prev] [next>] [day] [month] [year] [list]
Message-ID: <8c354331845a3ac599e84c3759da5944@sdomi.pl>
Date: Fri, 18 Oct 2024 13:27:26 +0100
From: sdomi <ja@...mi.pl>
To: netdev@...r.kernel.org
Subject: iproute2: unexpected expansion of IPv4 addresses
Hi,
I'm running iproute2-6.10.0 (from Alpine edge repositories), and I
noticed that when manipulating the routes using short-hand addresses,
the expansion is conducted in an unusual manner:
`ip r a 1.1 via 127.1` will result in `1.1.0.0 via 127.1.0.0 dev lo`,
while I'd expect it to be equivalent to `ip r a 1.0.0.1 via 127.0.0.1`.
The same issue is present when manipulating addresses (e.g. `ip a a
127.1.1 dev lo` results in `127.1.1.0` instead of `127.1.0.1`)
FWIW, I wasn't able to find an RFC which specified how this should be
implemented, and the deeper I look into it, the more it feels like a
40-year old BSD4.2 quirk that somehow lives on. Nonetheless, I think it
would be nice to either validate against using shorthands (as it can
cause confusion), or mimic what `ping` and other such utilities do.
~sdomi
Powered by blists - more mailing lists