guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

06/07: services: dhcp-client: Ignore interfaces that cannot be activated


From: guix-commits
Subject: 06/07: services: dhcp-client: Ignore interfaces that cannot be activated.
Date: Sun, 29 Dec 2019 12:25:34 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 747b7246a6d81ec2aafc9a1c737f85da3092c5dc
Author: Brice Waegeneire <address@hidden>
Date:   Sat Dec 14 08:23:26 2019 +0100

    services: dhcp-client: Ignore interfaces that cannot be activated.
    
    Fixes <https://bugs.gnu.org/38524>.
    
    * gnu/services/networking.scm (dhcp-client-service-type): Filter interfaces
    that cannot be activated.
    
    Signed-off-by: Ludovic Court├Ęs <address@hidden>
---
 gnu/services/networking.scm | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 6485c08..59b895d 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -234,14 +234,15 @@ fe80::1%lo0 apps.facebook.com\n")
                  (define valid?
                    (lambda (interface)
                      (and (arp-network-interface? interface)
-                          (not (loopback-network-interface? interface)))))
+                          (not (loopback-network-interface? interface))
+                          ;; XXX: Make sure the interfaces are up so that
+                          ;; 'dhclient' can actually send/receive over them.
+                          ;; Ignore those that cannot be activated.
+                          (false-if-exception
+                           (set-network-interface-up interface)))))
                  (define ifaces
                    (filter valid? (all-network-interface-names)))
 
-                 ;; XXX: Make sure the interfaces are up so that 'dhclient' can
-                 ;; actually send/receive over them.
-                 (for-each set-network-interface-up ifaces)
-
                  (false-if-exception (delete-file #$pid-file))
                  (let ((pid (fork+exec-command
                              (cons* #$dhclient "-nw"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]