diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-03-01 13:27:47 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-03-13 11:59:18 +0900 |
commit | fcbf4cb7270faa2624a0cf149f9518280e8a6714 (patch) | |
tree | b64aa98c4b00aec29b3c3b8f216a2cb712e78178 /src/network/networkd-neighbor.h | |
parent | 9560e5b3235e30eea2873e507d27ed00331d838c (diff) | |
download | systemd-fcbf4cb7270faa2624a0cf149f9518280e8a6714.tar.gz systemd-fcbf4cb7270faa2624a0cf149f9518280e8a6714.tar.bz2 systemd-fcbf4cb7270faa2624a0cf149f9518280e8a6714.zip |
network: drop sections contain invalid settings in network_verify()
If e.g., an [Address] section has an invalid setting, then
previously assigned settings in the section is freed, and
only later settings are stored. That may cause partially broken
section stored in Network object.
This makes if an invalid setting is found, then set 'invalid' flag
instead of freeing it. And invalid sections are dropped later by
network_verify().
Diffstat (limited to 'src/network/networkd-neighbor.h')
-rw-r--r-- | src/network/networkd-neighbor.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/networkd-neighbor.h b/src/network/networkd-neighbor.h index 094bf7977e..f591f0b03f 100644 --- a/src/network/networkd-neighbor.h +++ b/src/network/networkd-neighbor.h @@ -13,6 +13,7 @@ typedef struct Neighbor Neighbor; #include "networkd-link.h" #include "networkd-network.h" +#include "networkd-util.h" struct Neighbor { Network *network; @@ -29,7 +30,7 @@ struct Neighbor { void neighbor_free(Neighbor *neighbor); -DEFINE_TRIVIAL_CLEANUP_FUNC(Neighbor*, neighbor_free); +DEFINE_NETWORK_SECTION_FUNCTIONS(Neighbor, neighbor_free); int neighbor_configure(Neighbor *neighbor, Link *link, link_netlink_message_handler_t callback); |