If compiling RESCUE always ignore feature_present(3) calls so that
a /rescue/ifconfig more modern than the kernel could still configure IPv4 or IPv6 addresses. Reported by: Andrzej Tobola (ato iem.pw.edu.pl) Reported by: gcooper MFC after: 1 day X-MFC: will not MFC any time soon, just reminder for r222527
This commit is contained in:
parent
1bc399c4b1
commit
ad2571a225
@ -200,7 +200,10 @@ static struct afswtch af_inet = {
|
||||
static __constructor void
|
||||
inet_ctor(void)
|
||||
{
|
||||
|
||||
#ifndef RESCUE
|
||||
if (!feature_present("inet"))
|
||||
return;
|
||||
#endif
|
||||
af_register(&af_inet);
|
||||
}
|
||||
|
@ -545,8 +545,10 @@ inet6_ctor(void)
|
||||
#define N(a) (sizeof(a) / sizeof(a[0]))
|
||||
size_t i;
|
||||
|
||||
#ifndef RESCUE
|
||||
if (!feature_present("inet6"))
|
||||
return;
|
||||
#endif
|
||||
|
||||
for (i = 0; i < N(inet6_cmds); i++)
|
||||
cmd_register(&inet6_cmds[i]);
|
||||
|
@ -498,9 +498,11 @@ ifconfig(int argc, char *const *argv, int iscreate, const struct afswtch *uafp)
|
||||
* ifconfig IF up/down etc. to work without INET support as people
|
||||
* never used ifconfig IF link up/down, etc. either.
|
||||
*/
|
||||
#ifndef RESCUE
|
||||
#ifdef INET
|
||||
if (afp == NULL && feature_present("inet"))
|
||||
afp = af_getbyname("inet");
|
||||
#endif
|
||||
#endif
|
||||
if (afp == NULL)
|
||||
afp = af_getbyname("link");
|
||||
|
Loading…
x
Reference in New Issue
Block a user