Make IPv4 multicast space 224.0.0.0/4 broadcast by default.
authorEtienne Dechamps <etienne@edechamps.fr>
Sun, 29 Jun 2014 13:15:58 +0000 (14:15 +0100)
committerEtienne Dechamps <etienne@edechamps.fr>
Sun, 29 Jun 2014 15:48:57 +0000 (16:48 +0100)
We already do this for IPv6 multicast space (ff00::/8), so why not
extend it to IPv4.

doc/tinc.conf.5.in
src/net_setup.c

index 9566afa6bf34fa17f260e1e75b61ccb0bcb91329..ad75fa971c5bf222db4136a0de4b4c61ee2af257 100644 (file)
@@ -161,7 +161,7 @@ This is most useful to declare subnet broadcast addresses (e.g. 10.42.255.255),
 .Nm tinc
 won't know what to do with them.
 .Pp
-Note that global broadcast addresses (MAC ff:ff:ff:ff:ff:ff, IPv4 255.255.255.255), as well as IPv6 multicast space (ff00::/8) are always considered broadcast addresses and don't need to be declared.
+Note that global broadcast addresses (MAC ff:ff:ff:ff:ff:ff, IPv4 255.255.255.255), as well as multicast space (IPv4 224.0.0.0/4, IPv6 ff00::/8) are always considered broadcast addresses and don't need to be declared.
 .It Va ConnectTo Li = Ar name
 Specifies which other tinc daemon to connect to on startup.
 Multiple
index 0f8d31a6d68bebb3b844cc04f91841dc092793f9..6d15fcf1d6ad0a3342b46d6b9481dff1e41b88ce 100644 (file)
@@ -586,7 +586,7 @@ bool setup_myself_reloadable(void) {
                free(bmode);
        }
 
-       const char* const DEFAULT_BROADCAST_SUBNETS[] = { "ff:ff:ff:ff:ff:ff", "255.255.255.255", "ff00::/8" };
+       const char* const DEFAULT_BROADCAST_SUBNETS[] = { "ff:ff:ff:ff:ff:ff", "255.255.255.255", "224.0.0.0/4", "ff00::/8" };
        for (size_t i = 0; i < sizeof(DEFAULT_BROADCAST_SUBNETS) / sizeof(*DEFAULT_BROADCAST_SUBNETS); i++) {
                subnet_t *s = new_subnet();
                if (!str2net(s, DEFAULT_BROADCAST_SUBNETS[i]))