Don't scan for the "right" network interface by shooting in the dark.

Assume that the nfs_diskless structure is correctly set up; the provider
ought to be getting it right.
This commit is contained in:
msmith 2000-09-05 22:29:36 +00:00
parent e2f94e5aa5
commit 7de3089b6a
2 changed files with 6 additions and 0 deletions

View File

@ -441,6 +441,7 @@ nfs_mountroot(mp)
panic("nfs_mountroot: socreate(%04x): %d", panic("nfs_mountroot: socreate(%04x): %d",
nd->myif.ifra_addr.sa_family, error); nd->myif.ifra_addr.sa_family, error);
#if 0 /* XXX Bad idea */
/* /*
* We might not have been told the right interface, so we pass * We might not have been told the right interface, so we pass
* over the first ten interfaces of the same kind, until we get * over the first ten interfaces of the same kind, until we get
@ -455,6 +456,8 @@ nfs_mountroot(mp)
if(!error) if(!error)
break; break;
} }
#endif
error = ifioctl(so, SIOCAIFADDR, (caddr_t)&nd->myif, p);
if (error) if (error)
panic("nfs_mountroot: SIOCAIFADDR: %d", error); panic("nfs_mountroot: SIOCAIFADDR: %d", error);
soclose(so); soclose(so);

View File

@ -441,6 +441,7 @@ nfs_mountroot(mp)
panic("nfs_mountroot: socreate(%04x): %d", panic("nfs_mountroot: socreate(%04x): %d",
nd->myif.ifra_addr.sa_family, error); nd->myif.ifra_addr.sa_family, error);
#if 0 /* XXX Bad idea */
/* /*
* We might not have been told the right interface, so we pass * We might not have been told the right interface, so we pass
* over the first ten interfaces of the same kind, until we get * over the first ten interfaces of the same kind, until we get
@ -455,6 +456,8 @@ nfs_mountroot(mp)
if(!error) if(!error)
break; break;
} }
#endif
error = ifioctl(so, SIOCAIFADDR, (caddr_t)&nd->myif, p);
if (error) if (error)
panic("nfs_mountroot: SIOCAIFADDR: %d", error); panic("nfs_mountroot: SIOCAIFADDR: %d", error);
soclose(so); soclose(so);