summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2007-03-24 20:26:54 +0000
committeryar <yar@FreeBSD.org>2007-03-24 20:26:54 +0000
commit4b290448139db304f54bd5f27ffdf1897dbfa5f7 (patch)
treecf1f67c7299da75f02ad8225280c467999b9926e /sbin
parent5c635bf544761826106a749fa7714cdf082d1296 (diff)
downloadFreeBSD-src-4b290448139db304f54bd5f27ffdf1897dbfa5f7.zip
FreeBSD-src-4b290448139db304f54bd5f27ffdf1897dbfa5f7.tar.gz
Back out rev. 1.129 because it breaks the practice of auto-loading
hardware drivers. Unlike pseudo-device drivers, which just attach to the cloning framework and wait for "ifconfig create", h/w drivers create interfaces for installed cards as soon as loaded. The issue of devd(8) involuntarily reloading modules should be dealt with in a different way.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ifconfig/ifconfig.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index 6e4aa6a..e03a54d 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -228,6 +228,9 @@ main(int argc, char *argv[])
ifname = *argv;
argc--, argv++;
+ /* check and maybe load support for this interface */
+ ifmaybeload(ifname);
+
ifindex = if_nametoindex(ifname);
if (ifindex == 0) {
/*
@@ -241,7 +244,6 @@ main(int argc, char *argv[])
if (iflen >= sizeof(name))
errx(1, "%s: cloning name too long",
ifname);
- ifmaybeload(ifname);
ifconfig(argc, argv, NULL);
exit(0);
}
OpenPOWER on IntegriCloud