From 116f2ed27a74982e4d1a19b7a8fd08b0aaee1f8d Mon Sep 17 00:00:00 2001 From: Etienne Dechamps Date: Sun, 29 Jun 2014 14:15:58 +0100 Subject: [PATCH] Make IPv4 multicast space 224.0.0.0/4 broadcast by default. We already do this for IPv6 multicast space (ff00::/8), so why not extend it to IPv4. --- doc/tinc.conf.5.in | 2 +- src/net_setup.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/tinc.conf.5.in b/doc/tinc.conf.5.in index 9566afa..ad75fa9 100644 --- a/doc/tinc.conf.5.in +++ b/doc/tinc.conf.5.in @@ -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 diff --git a/src/net_setup.c b/src/net_setup.c index 0f8d31a..6d15fcf 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -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])) -- 2.25.1