]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: add brief comments about bound_to and bound_by list
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 6 Jun 2021 06:32:24 +0000 (15:32 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 8 Jun 2021 19:59:23 +0000 (04:59 +0900)
src/network/networkd-link.c

index a894ef6e3b68597e5c979eb68b46d5e9f5d5e015..5bf81a2b63998ff51953ef19d702a1413d0bc347 100644 (file)
@@ -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;