From: Yu Watanabe Date: Sun, 6 Jun 2021 06:32:24 +0000 (+0900) Subject: network: add brief comments about bound_to and bound_by list X-Git-Tag: v249-rc1~60^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ad82f0c32b0536a0cc7383a30900dd7652151d4c;p=thirdparty%2Fsystemd.git network: add brief comments about bound_to and bound_by list --- diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index a894ef6e3b6..5bf81a2b639 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -692,6 +692,9 @@ int link_handle_bound_to_list(Link *link) { assert(link); + /* If at least one interface in bound_to_links has carrier, then make this interface up. + * If all interfaces in bound_to_links do not, then make this interface down. */ + if (hashmap_isempty(link->bound_to_links)) return 0; @@ -718,6 +721,8 @@ static int link_handle_bound_by_list(Link *link) { assert(link); + /* Update up or down state of interfaces which depend on this interface's carrier state. */ + if (hashmap_isempty(link->bound_by_links)) return 0;