Add a BOOTP_WIRED_TO option, for use on machines with multiple network
cards where the first detected card should not be used for bootp. Submitted by: Doug Ambrisko <ambrisko@whistle.com>
This commit is contained in:
parent
8bd965cce4
commit
8f7030a7cc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=34573
@ -2,7 +2,7 @@
|
||||
# LINT -- config file for checking all the sources, tries to pull in
|
||||
# as much of the source tree as it can.
|
||||
#
|
||||
# $Id: LINT,v 1.415 1998/03/09 22:09:10 eivind Exp $
|
||||
# $Id: LINT,v 1.416 1998/03/10 15:42:13 eivind Exp $
|
||||
#
|
||||
# NB: You probably don't want to try running a kernel built from this
|
||||
# file. Instead, you should start from GENERIC, and add options from
|
||||
@ -1375,6 +1375,7 @@ options BOOTP # Use BOOTP to obtain IP address/hostname
|
||||
options BOOTP_NFSROOT # NFS mount root filesystem using BOOTP info
|
||||
options "BOOTP_NFSV3" # Use NFS v3 to NFS mount root
|
||||
options BOOTP_COMPAT # Workaround for broken bootp daemons.
|
||||
options "BOOTP_WIRED_TO=fxp0" # Use interface fxp0 for BOOTP
|
||||
|
||||
#
|
||||
# An obsolete option to test kern_opt.c.
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $Id: options,v 1.65 1998/03/08 09:56:21 julian Exp $
|
||||
# $Id: options,v 1.66 1998/03/10 15:55:38 eivind Exp $
|
||||
#
|
||||
# On the handling of kernel options
|
||||
#
|
||||
@ -161,6 +161,7 @@ BOOTP opt_bootp.h
|
||||
BOOTP_COMPAT opt_bootp.h
|
||||
BOOTP_NFSROOT opt_bootp.h
|
||||
BOOTP_NFSV3 opt_bootp.h
|
||||
BOOTP_WIRED_TO opt_bootp.h
|
||||
GATEWAY opt_defunct.h
|
||||
MROUTING opt_mrouting.h
|
||||
INET opt_inet.h
|
||||
|
@ -2,7 +2,7 @@
|
||||
# LINT -- config file for checking all the sources, tries to pull in
|
||||
# as much of the source tree as it can.
|
||||
#
|
||||
# $Id: LINT,v 1.415 1998/03/09 22:09:10 eivind Exp $
|
||||
# $Id: LINT,v 1.416 1998/03/10 15:42:13 eivind Exp $
|
||||
#
|
||||
# NB: You probably don't want to try running a kernel built from this
|
||||
# file. Instead, you should start from GENERIC, and add options from
|
||||
@ -1375,6 +1375,7 @@ options BOOTP # Use BOOTP to obtain IP address/hostname
|
||||
options BOOTP_NFSROOT # NFS mount root filesystem using BOOTP info
|
||||
options "BOOTP_NFSV3" # Use NFS v3 to NFS mount root
|
||||
options BOOTP_COMPAT # Workaround for broken bootp daemons.
|
||||
options "BOOTP_WIRED_TO=fxp0" # Use interface fxp0 for BOOTP
|
||||
|
||||
#
|
||||
# An obsolete option to test kern_opt.c.
|
||||
|
@ -2,7 +2,7 @@
|
||||
# LINT -- config file for checking all the sources, tries to pull in
|
||||
# as much of the source tree as it can.
|
||||
#
|
||||
# $Id: LINT,v 1.415 1998/03/09 22:09:10 eivind Exp $
|
||||
# $Id: LINT,v 1.416 1998/03/10 15:42:13 eivind Exp $
|
||||
#
|
||||
# NB: You probably don't want to try running a kernel built from this
|
||||
# file. Instead, you should start from GENERIC, and add options from
|
||||
@ -1375,6 +1375,7 @@ options BOOTP # Use BOOTP to obtain IP address/hostname
|
||||
options BOOTP_NFSROOT # NFS mount root filesystem using BOOTP info
|
||||
options "BOOTP_NFSV3" # Use NFS v3 to NFS mount root
|
||||
options BOOTP_COMPAT # Workaround for broken bootp daemons.
|
||||
options "BOOTP_WIRED_TO=fxp0" # Use interface fxp0 for BOOTP
|
||||
|
||||
#
|
||||
# An obsolete option to test kern_opt.c.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: bootp_subr.c,v 1.9 1998/02/09 06:10:32 eivind Exp $ */
|
||||
/* $Id: bootp_subr.c,v 1.10 1998/03/14 03:25:14 tegge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Gordon Ross, Adam Glass
|
||||
@ -774,14 +774,25 @@ bootpc_init(void)
|
||||
/*
|
||||
* Find a network interface.
|
||||
*/
|
||||
#ifdef BOOTP_WIRED_TO
|
||||
printf("bootpc_init: wired to interface '%s'\n",
|
||||
__XSTRING(BOOTP_WIRED_TO));
|
||||
#endif
|
||||
bzero(&ireq, sizeof(ireq));
|
||||
for (ifp = TAILQ_FIRST(&ifnet); ifp != 0; ifp = TAILQ_NEXT(ifp,if_link))
|
||||
{
|
||||
sprintf(ireq.ifr_name, "%s%d", ifp->if_name, ifp->if_unit);
|
||||
#ifdef BOOTP_WIRED_TO
|
||||
if (strcmp(ireq.ifr_name, __XSTRING(BOOTP_WIRED_TO)) == 0)
|
||||
break;
|
||||
#else
|
||||
if ((ifp->if_flags &
|
||||
(IFF_LOOPBACK|IFF_POINTOPOINT)) == 0)
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
if (ifp == NULL)
|
||||
panic("bootpc_init: no suitable interface");
|
||||
bzero(&ireq,sizeof(ireq));
|
||||
sprintf(ireq.ifr_name, "%s%d", ifp->if_name,ifp->if_unit);
|
||||
strcpy(nd->myif.ifra_name,ireq.ifr_name);
|
||||
printf("bootpc_init: using network interface '%s'\n",
|
||||
ireq.ifr_name);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: bootp_subr.c,v 1.9 1998/02/09 06:10:32 eivind Exp $ */
|
||||
/* $Id: bootp_subr.c,v 1.10 1998/03/14 03:25:14 tegge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Gordon Ross, Adam Glass
|
||||
@ -774,14 +774,25 @@ bootpc_init(void)
|
||||
/*
|
||||
* Find a network interface.
|
||||
*/
|
||||
#ifdef BOOTP_WIRED_TO
|
||||
printf("bootpc_init: wired to interface '%s'\n",
|
||||
__XSTRING(BOOTP_WIRED_TO));
|
||||
#endif
|
||||
bzero(&ireq, sizeof(ireq));
|
||||
for (ifp = TAILQ_FIRST(&ifnet); ifp != 0; ifp = TAILQ_NEXT(ifp,if_link))
|
||||
{
|
||||
sprintf(ireq.ifr_name, "%s%d", ifp->if_name, ifp->if_unit);
|
||||
#ifdef BOOTP_WIRED_TO
|
||||
if (strcmp(ireq.ifr_name, __XSTRING(BOOTP_WIRED_TO)) == 0)
|
||||
break;
|
||||
#else
|
||||
if ((ifp->if_flags &
|
||||
(IFF_LOOPBACK|IFF_POINTOPOINT)) == 0)
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
if (ifp == NULL)
|
||||
panic("bootpc_init: no suitable interface");
|
||||
bzero(&ireq,sizeof(ireq));
|
||||
sprintf(ireq.ifr_name, "%s%d", ifp->if_name,ifp->if_unit);
|
||||
strcpy(nd->myif.ifra_name,ireq.ifr_name);
|
||||
printf("bootpc_init: using network interface '%s'\n",
|
||||
ireq.ifr_name);
|
||||
|
Loading…
Reference in New Issue
Block a user