From owner-freebsd-current Fri Mar 13 09:21:16 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA00977 for freebsd-current-outgoing; Fri, 13 Mar 1998 09:21:16 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA00889 for ; Fri, 13 Mar 1998 09:20:42 -0800 (PST) (envelope-from ambrisko@whistle.com) Received: (from daemon@localhost) by alpo.whistle.com (8.8.5/8.8.5) id JAA01990; Fri, 13 Mar 1998 09:12:47 -0800 (PST) Received: from UNKNOWN(), claiming to be "crab.whistle.com" via SMTP by alpo.whistle.com, id smtpd001988; Fri Mar 13 09:12:44 1998 Received: (from ambrisko@localhost) by crab.whistle.com (8.8.8/8.6.12) id JAA13572; Fri, 13 Mar 1998 09:08:44 -0800 (PST) From: Doug Ambrisko Message-Id: <199803131708.JAA13572@crab.whistle.com> Subject: Re: Netboot problem: RPC timeout for server 0x0 In-Reply-To: <199803130421.FAA16144@pat.idi.ntnu.no> from Tor Egge at "Mar 13, 98 05:21:05 am" To: Tor.Egge@idi.ntnu.no (Tor Egge) Date: Fri, 13 Mar 1998 09:08:44 -0800 (PST) Cc: freebsd-current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL29 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Tor Egge writes: | > If go back in time just before this then it is fine, just after then | > it breaks. The time is 2/20/98 8:40:00 then it breaks, 8:30 is fine. | | This is actually a very good indication of what's going wrong. | | Try this patch. Yes this fixed it. Thanks, I have attached a diff to current that has your fix and a new feature in the BOOTP code. I have created a kernel config option: options "BOOTP_WIRED_TO=fxp0" # Use interface fxp0 for BOOTP This is useful in a machine that has multiple ethernet cards and the first card detected is not the card that was used for BOOTP. Index: sys/conf/options =================================================================== RCS file: /cvs/freebsd/src/sys/conf/options,v retrieving revision 1.66 diff -u -r1.66 options --- options 1998/03/10 15:55:38 1.66 +++ options 1998/03/13 16:51:46 @@ -161,6 +161,7 @@ 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 Index: sys/i386/conf/LINT =================================================================== RCS file: /cvs/freebsd/src/sys/i386/conf/LINT,v retrieving revision 1.416 diff -u -r1.416 LINT --- LINT 1998/03/10 15:42:13 1.416 +++ LINT 1998/03/13 16:51:48 @@ -1375,6 +1375,7 @@ 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. Index: sys/nfs/bootp_subr.c =================================================================== RCS file: /cvs/freebsd/src/sys/nfs/bootp_subr.c,v retrieving revision 1.9 diff -u -r1.9 bootp_subr.c --- bootp_subr.c 1998/02/09 06:10:32 1.9 +++ bootp_subr.c 1998/03/13 16:51:53 @@ -766,18 +766,32 @@ return; /* - * Bump time if 0. + * Wait until arp entries can be handled. */ - if (!time.tv_sec) - time.tv_sec++; + while (time.tv_sec == 0) + tsleep(&time, PZERO+8, "arpkludge", 10); /* * Find a network interface. */ +#ifdef BOOTP_WIRED_TO +#define xstr(s) str(s) +#define str(s) #s + printf("bootpc_init: wired to interface '%s'\n", + xstr(BOOTP_WIRED_TO)); +#endif for (ifp = TAILQ_FIRST(&ifnet); ifp != 0; ifp = TAILQ_NEXT(ifp,if_link)) +#ifdef BOOTP_WIRED_TO + { + sprintf(ireq.ifr_name, "%s%d", ifp->if_name,ifp->if_unit); + if (strcmp(ireq.ifr_name,xstr(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)); Index: sys/nfs/krpc_subr.c =================================================================== RCS file: /cvs/freebsd/src/sys/nfs/krpc_subr.c,v retrieving revision 1.7 diff -u -r1.7 krpc_subr.c --- krpc_subr.c 1997/10/28 15:59:03 1.7 +++ krpc_subr.c 1998/03/13 16:51:53 @@ -337,7 +337,7 @@ timo++; else printf("RPC timeout for server 0x%x\n", - ntohl(sin->sin_addr.s_addr)); + ntohl(sa->sin_addr.s_addr)); /* * Wait for up to timo seconds for a reply. Index: sys/nfs/nfs_vfsops.c =================================================================== RCS file: /cvs/freebsd/src/sys/nfs/nfs_vfsops.c,v retrieving revision 1.55 diff -u -r1.55 nfs_vfsops.c --- nfs_vfsops.c 1998/03/01 22:46:30 1.55 +++ nfs_vfsops.c 1998/03/13 16:51:53 @@ -399,8 +399,8 @@ * XXX time must be non-zero when we init the interface or else * the arp code will wedge... */ - if (time.tv_sec == 0) - time.tv_sec = 1; + while (time.tv_sec == 0) + tsleep(&time, PZERO+8, "arpkludge", 10); if (nfs_diskless_valid==1) nfs_convert_diskless(); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message