]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network/address: warn but ignore Broadcast= setting for an IPv6 address
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 22 Sep 2024 18:30:32 +0000 (03:30 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 11 Oct 2024 18:26:06 +0000 (03:26 +0900)
Previously, the below was refused and the IPv6 address would not assigned.
===
[Address]
Address=2001:db8:0:f101::15/64
Broadcast=192.168.0.255
===
However, in the following case, networkd warned about the broadcast
address would be ignored, and the IPv6 address would be configured.
===
[Address]
Broadcast=192.168.0.255
Address=2001:db8:0:f101::15/64
===

src/network/networkd-address.c

index 2464f4bf15c6630429a4266f7b76dbcba5d87273..e2fec8e268d9b8710975bc3353f4b28759764c6c 100644 (file)
@@ -2048,12 +2048,6 @@ static int config_parse_broadcast(
                 return 1;
         }
 
-        if (address->family == AF_INET6) {
-                log_syntax(unit, LOG_WARNING, filename, line, 0,
-                           "Broadcast is not valid for IPv6 addresses, ignoring assignment: %s", rvalue);
-                return 0;
-        }
-
         r = in_addr_from_string(AF_INET, rvalue, &u);
         if (r < 0)
                 return log_syntax_parse_error(unit, filename, line, r, lvalue, rvalue);