Blame SOURCES/0518-network-Only-bring-up-wired-network-interfaces.patch

18971c
From 240c2fea10fda5c84a7725e8711d9cb214a064a9 Mon Sep 17 00:00:00 2001
18971c
From: Javier Martinez Canillas <javierm@redhat.com>
18971c
Date: Wed, 9 Aug 2017 18:50:44 +0200
18971c
Subject: [PATCH] network: Only bring up wired network interfaces
18971c
18971c
The dracut network module is only supposed to be used for wired interfaces
18971c
but if driver modules for wireless devices are wrongly copied, these will
18971c
be loaded and the available interfaces brought up.
18971c
18971c
If the rd.neednet=1 command line parameter is used, dhclient will attempt
18971c
to request an IP address for the interfaces and these requests will fail.
18971c
18971c
But other dracut modules that depend on the network to be settled, will
18971c
have to wait for the DHCP requests to timeout. Which can be a lot of time
18971c
since the dhclient default timeout value is 60 seconds.
18971c
18971c
Instead of trying to blacklist all possible kernel modules for wireless
18971c
devices, only bring up network interfaces if these are for wired devices.
18971c
18971c
Suggested-by: Harald Hoyer <harald@redhat.com>
18971c
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
18971c
18971c
Cherry-picked from: 17927597213854b2fdf15461353882339fdb5051
18971c
Resolves: #1480246
18971c
---
18971c
 modules.d/40network/net-genrules.sh | 2 +-
18971c
 1 file changed, 1 insertion(+), 1 deletion(-)
18971c
18971c
diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh
18971c
index 08072fbe..c4396f77 100755
18971c
--- a/modules.d/40network/net-genrules.sh
18971c
+++ b/modules.d/40network/net-genrules.sh
18971c
@@ -102,7 +102,7 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh
18971c
     # Default: We don't know the interface to use, handle all
18971c
     # Fixme: waiting for the interface as well.
18971c
     else
18971c
-        cond='ACTION=="add", SUBSYSTEM=="net"'
18971c
+        cond='ACTION=="add", SUBSYSTEM=="net", ENV{DEVTYPE}!="wlan|wwan"'
18971c
         # if you change the name of "91-default-net.rules", also change modules.d/80cms/cmssetup.sh
18971c
         echo "$cond, $runcmd" > /etc/udev/rules.d/91-default-net.rules
18971c
     fi