! ! 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 ! Reviewed by: ! MFC after: 1 day ! X-MFC: will not MFC any time soon, just reminder for r222527 ! Index: sbin/ifconfig/af_inet.c =================================================================== --- sbin/ifconfig/af_inet.c (revision 222851) +++ sbin/ifconfig/af_inet.c (working copy) @@ -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); } Index: sbin/ifconfig/ifconfig.c =================================================================== --- sbin/ifconfig/ifconfig.c (revision 222851) +++ sbin/ifconfig/ifconfig.c (working copy) @@ -498,10 +498,12 @@ ifconfig(int argc, char *const *argv, int iscreate * 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"); if (afp == NULL) { Index: sbin/ifconfig/af_inet6.c =================================================================== --- sbin/ifconfig/af_inet6.c (revision 222851) +++ sbin/ifconfig/af_inet6.c (working copy) @@ -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]);