5 ms·
It's not correct that the modern Linux kernel refuses to forward packets with a source address in 0.0.0.0/8. The only address that it refuses to forward this wa
by schoen 3y ago
It's not correct that the modern Linux kernel refuses to forward packets with a source address in 0.0.0.0/8. The only address that it refuses to forward this way is 0.0.0.0/32.
I just got a patch into the ip(7) man page that describes this
https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/commit/?id=8cf319f3db889f80b0309ac32ef61be0b7d8cb94 https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/...
although there hasn't been a man-pages release since then, so you probably can't see this on your own system yet.
The original change (included in Linux 5.3) is
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=96125bf9985a75db00496dd2bc9249b777d2b19b https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...
(I'm working on a project that aims to make these addresses potentially useful for numbering Internet hosts in the future, as part of which Dave Taht's patch linked above was written, so I follow this very closely!)
Separately, you need to be able to process a 0.0.0.0/32 source address on external interfaces (though not to forward it) in order to be able to implement a DHCP server, as that's the source address used by DHCP clients. (edit: another commenter pointed out that this commonly uses raw sockets so it doesn't necessarily require any explicit kernel support)
- usovalx 3y agoMay dhcp client/servers are using raw sockets and will thus bypass incorrect firewall config/martian packet filtering.
- schoen 3y agoYes, I forgot about that but you're right that that's the typical implementation method. So the DHCP case does not necessarily need any special kernel support (other than not prefiltering before the raw socket). Thanks for the correction.
- bombcar 3y agoIs there any similar work to change 127/8 to be something more reasonable like 127/16 or 24?
- schoen 3y agoWe have proposed it! https://www.ietf.org/archive/id/draft-schoen-intarea-unicast-127-03.html https://www.ietf.org/archive/id/draft-schoen-intarea-unicast... The big prize is 240/4. https://www.ietf.org/archive/id/draft-schoen-intarea-unicast-240-04.html https://www.ietf.org/archive/id/draft-schoen-intarea-unicast... Our proposals have not been warmly received in the intarea WG so far.
- jacquesm 3y agoI think it is pretty reasonable to be reluctant to make such changes because it may well break stuff.
- schoen 3y agoWell, for 240/4 in particular we (in a very expansive sense of "we"¹) started making the change back in 2008 in response to https://datatracker.ietf.org/doc/pdf/draft-fuller-240space-00 https://datatracker.ietf.org/doc/pdf/draft-fuller-240space-0... If we (for an expansive sense of "we") had kept it up more actively, we would already have had 15 years of progress on updating implementations and evolving people's expectations. That wouldn't have been a super-fast change, necessarily. We (for a narrow sense of "we") think it's pretty likely that people will still be interested in having more IPv4 space in 15 years from now, so it's too bad that progress is (somewhat) stalled on this (with most Unix-like systems allowing it, and Windows not allowing it, and dedicated routers from before about 2013-2016 often not allowing it). ¹ the specific project I'm working on, started by John Gilmore, didn't exist yet at that time, but is trying to revive/continue this idea
- jacquesm 3y agoFair enough, but that more or less emphasizes my point: if it wasn't done by 2010 or so that means that a ton of IoT hardware has now shipped that may never see updates and that would possibly end up failing when presented with such a departure from what the expected behavior was at the time the hardware was shipped. You change old established standards at your peril, especially how IPV4 is routed and which ranges are reserved. There are quite a few things that retrospectively could have been handled better and a large number of huge ranges got handed out like candy back in the day. Some of those have been reclaimed and some still remain. It may be easier and with less chance of breaking stuff if those ranges were reclaimed more aggressively.