network: actually show the unexpected flags

The original version would yield a slightly _unexpected_ message for
this [Address] section:

[Address]
Address=10.9.3.1/24
HomeAddress=yes
ManageTemporaryAddress=yes

systemd-networkd[68396]: /run/systemd/network/25-address-static.network: unexpected address flags "n/a" were configured. Ignoring [Address] section from line 144.

Let's instead show the unexpected flags:

systemd-networkd[69160]: /run/systemd/network/25-address-static.network: unexpected address flags "home-address,manage-temporary-address" were configured. Ignoring [Address] section from line 144.
This commit is contained in:
Frantisek Sumsal
2023-12-12 18:56:43 +09:00
committed by Yu Watanabe
parent 04651f7564
commit b7d435925d
+1 -1
View File
@@ -2472,7 +2472,7 @@ int address_section_verify(Address *address) {
if (address->flags != filtered_flags) {
_cleanup_free_ char *str = NULL;
(void) address_flags_to_string_alloc(filtered_flags, address->family, &str);
(void) address_flags_to_string_alloc(address->flags ^ filtered_flags, address->family, &str);
return log_warning_errno(SYNTHETIC_ERRNO(EINVAL),
"%s: unexpected address flags \"%s\" were configured. "
"Ignoring [Address] section from line %u.",