Skip to content

Commit 9363cb2

Browse files
author
Dave Taht
committed
Initial commit
1 parent 7805ebe commit 9363cb2

17 files changed

+521
-1
lines changed

127.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# 127.0.0.0/8
2+
3+
Traditionally this address range has been used for "local to the host"
4+
communication, however in surveying the state of the universe, only a few
5+
IP addresses are used
6+
7+
We propose cutting down the "local space" to 127.0.0.0/16 (e.g. 127.0.0.0-
8+
127.0.255.255) and allowing
9+
10+
and even to some extent smarter ones, don't care what appears on the
11+
wire.

CLASSE.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Making the former class-e space global unicast
2+
3+
[patches/linux]
4+

FAQ.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Frequently Asked Questions
2+
3+
## Focus
4+
5+
## It will take too long
6+
7+
## These addresses will never work
8+
9+
## We could allocate all these addresses
10+
11+
## IPv6
12+
13+
## Class-E is easy
14+
15+
## globally routable
16+
17+
why try to make 0/8 and 240/4 globally routable
18+
19+
any attempt stumbles on the fact that manufacturers, users need to be
20+
incented to - some piece of gear will inevitably not allow ipv4 addresses
21+
in this range unless a standard exists.
22+
23+
Limited use IPv4 address spaces
24+
25+
Making class-e in particular globally routable makes it more possible
26+
to address other long-standing bugs in ipv4 implementations like zeroth
27+
networks,

MULTICAST.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
Thin layer above the MAC that translates a 224/4 address into a multicast
3+
request. Converting the former RESERVED range (232-229) into unicast requests
4+
5+
6+
7+

OVERVIEW.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
carved up the world into into class A, class B,
2+
3+
It seemed an eminently good division at the time
4+
5+
# Timeline
6+
7+
* 1972 Arpanet rolled out
8+
* 1981 TCP/IP rolled out
9+
* 1992 CIDR developed
10+
* 1994 IPv6 started
11+
* 2012 IPv6 rollout started
12+

PATCHES.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Patches needed
2+
3+
## 240/4
4+
5+
### Linux
6+
7+
### FreeBSD
8+
9+
### Windows
10+
11+
## 0/8
12+
13+
### Linux
14+
15+
### FreeBSD
16+
17+
### Windows
18+
19+
## 127/8
20+
21+
### Linux
22+
23+
### FreeBSD
24+
25+
### Windows
26+
27+
## 232/8-239/8
28+
29+
### Linux
30+
31+
### FreeBSD
32+
33+
### Windows
34+
35+

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# ipv4-cleanup
2-
the IPv4 cleanup project - Making class-e (240/4), 0/, 127/8, 224/4 more usable - adding 419 million new IPs to the world
2+
The IPv4 cleanup project - Making class-e (240/4), 0/, 127/8, 224/4 more usable - adding 419 million new IPs to the world

ZERO.md

Whitespace-only changes.

ZEROTH.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Fixing zeroth addressing
2+
3+
After CIDR rolled out
4+
5+
Is generally restricted to
6+
7+
made in the early 80s, that made 0 the broadcast address in BSD 4.3. BSD
8+
4.3 has long since been retired and we know of no operating system made
9+
in the last 3 decades that uses '0' for broadcast.
10+
11+
finding and eliminating the last remaining vestiges of zeroth
12+
13+
Is generally limited to "ping", where an attempt to ping the zeroth
14+
network address still results in
15+
16+
fixing ping is not a problem: patches
17+
18+
Any rational assessment of IPv4's continued existence stretches out
19+
another 20 years.
20+
That by increasing the range of usable ipv4 addresses

patches/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This directory contains accumulated patches for opening up the
2+
former "class-e" ipv4 address space.
3+

patches/freebsd/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# FreeBSD patches
2+
3+
So far as we know on patch - for ICMP only - is needed for freeBSD
4+
to fully support class e.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
From 46bf067870156abd61fe24d14c2486d15b8b502c Mon Sep 17 00:00:00 2001
2+
From: Dave Taht <dave@taht.net>
3+
Date: Fri, 14 Dec 2018 18:38:40 +0000
4+
Subject: [PATCH 1/1] Allow class-e address assignment in ifconfig and early
5+
boot
6+
7+
While the linux kernel became mostly "class-e clean" a decade ago,
8+
and most distributions long ago switched to the iproute2 suite
9+
of utilities, which allow class-e (240.0.0.0/4) address assignment,
10+
distributions relying on busybox, toybox and other forms of
11+
ifconfig cannot assign class-e addresses without this kernel patch.
12+
13+
With this patch, also, a boot command line on these addresses is feasible:
14+
(ip=248.0.1.2::248.0.1.1:255.255.255.0).
15+
16+
While CIDR has been obsolete for 2 decades, and a survey of all the
17+
userspace open source code in the world shows most IN_whatever macros
18+
are also obsolete... rather than obsolete CIDR from this ioctl entirely,
19+
this patch merely enables class-e assignment, sanely.
20+
21+
H/T to Vince Fuller and his original patch here:
22+
https://lkml.org/lkml/2008/1/7/370
23+
24+
Signed-off-by: Dave Taht <dave.taht@gmail.com>
25+
Reviewed-by: John Gilmore <gnu@toad.com>
26+
---
27+
include/uapi/linux/in.h | 8 ++++++--
28+
net/ipv4/devinet.c | 4 +++-
29+
net/ipv4/ipconfig.c | 2 ++
30+
3 files changed, 11 insertions(+), 3 deletions(-)
31+
32+
diff --git a/include/uapi/linux/in.h b/include/uapi/linux/in.h
33+
index 48e8a225b985..b27269a2bc95 100644
34+
--- a/include/uapi/linux/in.h
35+
+++ b/include/uapi/linux/in.h
36+
@@ -268,8 +268,12 @@ struct sockaddr_in {
37+
#define IN_MULTICAST(a) IN_CLASSD(a)
38+
#define IN_MULTICAST_NET 0xF0000000
39+
40+
-#define IN_EXPERIMENTAL(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000)
41+
-#define IN_BADCLASS(a) IN_EXPERIMENTAL((a))
42+
+#define IN_BADCLASS(a) ((((long int) (a) ) == 0xffffffff)
43+
+#define IN_EXPERIMENTAL(a) IN_BADCLASS((a))
44+
+
45+
+#define IN_CLASSE(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000)
46+
+#define IN_CLASSE_NET 0xffffffff
47+
+#define IN_CLASSE_NSHIFT 0
48+
49+
/* Address to accept any incoming messages. */
50+
#define INADDR_ANY ((unsigned long int) 0x00000000)
51+
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
52+
index 5b9b6d497f71..36dac0afcba5 100644
53+
--- a/net/ipv4/devinet.c
54+
+++ b/net/ipv4/devinet.c
55+
@@ -952,7 +952,7 @@ static int inet_abc_len(__be32 addr)
56+
{
57+
int rc = -1; /* Something else, probably a multicast. */
58+
59+
- if (ipv4_is_zeronet(addr))
60+
+ if (ipv4_is_zeronet(addr) || ipv4_is_lbcast(addr))
61+
rc = 0;
62+
else {
63+
__u32 haddr = ntohl(addr);
64+
@@ -963,6 +963,8 @@ static int inet_abc_len(__be32 addr)
65+
rc = 16;
66+
else if (IN_CLASSC(haddr))
67+
rc = 24;
68+
+ else if (IN_CLASSE(haddr))
69+
+ rc = 32;
70+
}
71+
72+
return rc;
73+
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
74+
index 55757764c381..86820bcc1b6a 100644
75+
--- a/net/ipv4/ipconfig.c
76+
+++ b/net/ipv4/ipconfig.c
77+
@@ -429,6 +429,8 @@ static int __init ic_defaults(void)
78+
ic_netmask = htonl(IN_CLASSB_NET);
79+
else if (IN_CLASSC(ntohl(ic_myaddr)))
80+
ic_netmask = htonl(IN_CLASSC_NET);
81+
+ else if (IN_CLASSE(ntohl(ic_myaddr)))
82+
+ ic_netmask = htonl(IN_CLASSE_NET);
83+
else {
84+
pr_err("IP-Config: Unable to guess netmask for address %pI4\n",
85+
&ic_myaddr);
86+
--
87+
2.17.1
88+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
From 12d5d77d4053d7511e14853c24bba7d0a3a71c4e Mon Sep 17 00:00:00 2001
2+
From: Dave Taht <dave@taht.net>
3+
Date: Sun, 9 Dec 2018 04:52:33 +0000
4+
Subject: [PATCH] Support class-e addressing in netifd
5+
6+
---
7+
proto.c | 6 +-----
8+
1 file changed, 1 insertion(+), 5 deletions(-)
9+
10+
diff --git a/proto.c b/proto.c
11+
index 6047735..2819e30 100644
12+
--- a/proto.c
13+
+++ b/proto.c
14+
@@ -131,11 +131,7 @@ parse_addr(struct interface *iface, const char *str, bool v6, int mask,
15+
if (!parse_ip_and_netmask(af, str, &addr->addr, &addr->mask))
16+
goto error;
17+
18+
- if (!v6) {
19+
- if (IN_EXPERIMENTAL(ntohl(addr->addr.in.s_addr)))
20+
- goto error;
21+
-
22+
- } else if (IN6_IS_ADDR_MULTICAST(&addr->addr.in6))
23+
+ if (!v6 && IN6_IS_ADDR_MULTICAST(&addr->addr.in6))
24+
goto error;
25+
26+
if (broadcast)
27+
--
28+
2.17.1
29+

patches/openwrt/README.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# OpenWRT patches
2+
3+
For class e support three patches were needed.
4+
5+
* Backport of linux 4.20 ifconfig ioctl. Status: ACCEPTED.
6+
* Removal of IN_EXPERIMENTAL check in netifd. Status: ACCEPTED.
7+
* Removal of 240/4 from bcp38 packge. Status: ACCEPTEDa
8+
9+
OpenWrt 19.01 will be fully class-e capable
10+
11+
# 0/8 support
12+
13+
# 232/8-239/8 Support
14+
15+
# 127/8

0 commit comments

Comments
 (0)