summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient/bootp_subr.c
diff options
context:
space:
mode:
authortegge <tegge@FreeBSD.org>1998-03-14 04:13:56 +0000
committertegge <tegge@FreeBSD.org>1998-03-14 04:13:56 +0000
commit9ac0a4296a0f23bdf81b9ddcc86b59b60e266405 (patch)
tree860b07eab1e0a706d6733880bd3eba931d6495f7 /sys/nfsclient/bootp_subr.c
parent3483aa429fc32f1e613bff2b2f885f0ef7335433 (diff)
downloadFreeBSD-src-9ac0a4296a0f23bdf81b9ddcc86b59b60e266405.zip
FreeBSD-src-9ac0a4296a0f23bdf81b9ddcc86b59b60e266405.tar.gz
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>
Diffstat (limited to 'sys/nfsclient/bootp_subr.c')
-rw-r--r--sys/nfsclient/bootp_subr.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/sys/nfsclient/bootp_subr.c b/sys/nfsclient/bootp_subr.c
index 4053bc3..7dbcd9e 100644
--- a/sys/nfsclient/bootp_subr.c
+++ b/sys/nfsclient/bootp_subr.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);
OpenPOWER on IntegriCloud