From ad82f0c32b0536a0cc7383a30900dd7652151d4c Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sun, 6 Jun 2021 15:32:24 +0900 Subject: [PATCH] network: add brief comments about bound_to and bound_by list --- src/network/networkd-link.c | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 2.47.3