From owner-freebsd-hackers Fri Feb 1 17:51:10 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from motoko.hayai.de (potwin.de [217.115.141.118]) by hub.freebsd.org (Postfix) with ESMTP id A2E2237B4A9 for ; Fri, 1 Feb 2002 17:50:01 -0800 (PST) Received: from motoko.hayai.de (localhost [127.0.0.1]) by motoko.hayai.de (8.12.2/8.11.2) with ESMTP id g121nt5s002227 (using TLSv1/SSLv3 with cipher EDH-RSA-DES-CBC3-SHA (168 bits) verified NO); Sat, 2 Feb 2002 02:49:55 +0100 Received: (from marco@localhost) by motoko.hayai.de (8.12.2/8.12.2/Submit) id g121nnOR002226; Sat, 2 Feb 2002 02:49:49 +0100 Date: Sat, 2 Feb 2002 02:49:49 +0100 From: Marco Wertejuk To: freebsd-hackers@freebsd.org Cc: ume@mahoroba.org Subject: rtadvd bugfix? Message-ID: <20020202024949.A2176@motoko.hayai.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="0OAP2g/MAC+5xKAE" Content-Disposition: inline User-Agent: Mutt/1.3.23i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --0OAP2g/MAC+5xKAE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, I was really nerved when I noticed that rtadvd is exiting without any notice if the host is not an ipv6 gateway. Since it took me a lot of time to find this problem I wrote a patch for rtadvd to show a message and noticed something strange: rtadvd won't exit even if ipv6 forwarding is not enabled, take a look at this patch. (attachement) Watch out for the changed if-condition. Is that really a bug ? The patch works fine for on freebsd 4.5-stable using kame version 20010528/FreeBSD. -- Mit freundlichen Gruessen, Marco Wertejuk - mwcis.com Computer/Internet/Security-Services --0OAP2g/MAC+5xKAE Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="rtadvd.patch" *** config.c.orig Tue Jul 3 11:02:14 2001 --- config.c Sat Feb 2 02:03:32 2002 *************** *** 124,131 **** /* check if we are allowed to forward packets (if not determined) */ if (forwarding < 0) { ! if ((forwarding = getinet6sysctl(IPV6CTL_FORWARDING)) < 0) exit(1); } /* get interface information */ --- 124,133 ---- /* check if we are allowed to forward packets (if not determined) */ if (forwarding < 0) { ! if ((forwarding = getinet6sysctl(IPV6CTL_FORWARDING)) <= 0) { ! fprintf (stdout, "rtadvd: ipv6 forwarding is disabled\n"); exit(1); + } } /* get interface information */ --0OAP2g/MAC+5xKAE-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message