From owner-freebsd-bugs Mon Nov 25 13:20: 4 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 632C037B401 for ; Mon, 25 Nov 2002 13:20:02 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8A7EF43EAF for ; Mon, 25 Nov 2002 13:20:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id gAPLK1x3038175 for ; Mon, 25 Nov 2002 13:20:01 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id gAPLK1YT038174; Mon, 25 Nov 2002 13:20:01 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9312437B401 for ; Mon, 25 Nov 2002 13:14:48 -0800 (PST) Received: from kartoffel.salatschuessel.net (p5084B556.dip.t-dialin.net [80.132.181.86]) by mx1.FreeBSD.org (Postfix) with ESMTP id 83E3243E88 for ; Mon, 25 Nov 2002 13:14:36 -0800 (PST) (envelope-from olivleh1@kartoffel.salatschuessel.net) Received: from kartoffel.salatschuessel.net (localhost [127.0.0.1]) by kartoffel.salatschuessel.net (8.12.6/8.12.6) with ESMTP id gAPLE3lw058365; Mon, 25 Nov 2002 22:14:03 +0100 (CET) (envelope-from olivleh1@kartoffel.salatschuessel.net) Received: (from olivleh1@localhost) by kartoffel.salatschuessel.net (8.12.6/8.12.6/Submit) id gAPLE27W058364; Mon, 25 Nov 2002 22:14:02 +0100 (CET) Message-Id: <200211252114.gAPLE27W058364@kartoffel.salatschuessel.net> Date: Mon, 25 Nov 2002 22:14:02 +0100 (CET) From: Oliver Lehmann Reply-To: Oliver Lehmann To: FreeBSD-gnats-submit@FreeBSD.org Cc: Oliver Lehmann X-Send-Pr-Version: 3.113 Subject: bin/45729: make rbootd transfere the default file if it's undefined by the client Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 45729 >Category: bin >Synopsis: make rbootd transfere the default file if it's undefined by the client >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Nov 25 13:20:00 PST 2002 >Closed-Date: >Last-Modified: >Originator: Oliver Lehmann >Release: FreeBSD 4.7-STABLE i386 >Organization: >Environment: System: FreeBSD kartoffel.salatschuessel.net 4.7-STABLE FreeBSD 4.7-STABLE #0: Thu Nov 21 15:02:15 CET 2002 olivleh1@nudel.salatschuessel.net:/usr/obj/i386/usr/src/sys/KARTOFFEL i386 >Description: My HP Apollo does not specify a filename to boot from. Rbootd replies with error code 16 (file does not exist). Why not let rbootd transfer the file assigned to the senders hardware adress (specified in the rbootd.conf) instead of aborting? >How-To-Repeat: Get an older HP 700s (maybe other systems too) and try to "boot lan". >Fix: --- patch-src::libexec::rbootd::rmpproto.c begins here --- --- src/libexec/rbootd/rmpproto.c.orig Mon Nov 25 01:26:35 2002 +++ src/libexec/rbootd/rmpproto.c Mon Nov 25 21:55:54 2002 @@ -352,11 +352,20 @@ goto match; /* - * Invalid boot file name, set error and send reply packet. + * If the client didn't declare a filename to boot from, use the + * default bootimage specified in the rbootd.conf and proceed. + * In case the client specified a filename which is not available to + * boot from (not specified in the rboot.conf, or nonexistent in the + * filesystem), set error and send reply packet. */ - rpl->r_brpl.rmp_retcode = RMP_E_NOFILE; - retval = 0; - goto sendpkt; + if((strlen(filename) == 0) && filelist[0]) { + filename = filelist[0]; + goto match; + } else { + rpl->r_brpl.rmp_retcode = RMP_E_NOFILE; + retval = 0; + goto sendpkt; + } match: /* --- patch-src::libexec::rbootd::rmpproto.c ends here --- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message