From owner-freebsd-rc@FreeBSD.ORG Sun Jul 17 02:30:28 2011 Return-Path: Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A391106566B for ; Sun, 17 Jul 2011 02:30:28 +0000 (UTC) (envelope-from kevlo@kevlo.org) Received: from ns.kevlo.org (kevlo.org [220.128.136.52]) by mx1.freebsd.org (Postfix) with ESMTP id 2A4498FC12 for ; Sun, 17 Jul 2011 02:30:27 +0000 (UTC) Received: from [127.0.0.1] (kevlo@kevlo.org [220.128.136.52]) by ns.kevlo.org (8.14.3/8.14.3) with ESMTP id p6H2UQqu000311; Sun, 17 Jul 2011 10:30:26 +0800 (CST) From: Kevin Lo To: Hiroki Sato In-Reply-To: <20110717.033537.180999432921199548.hrs@allbsd.org> References: <1310623300.37158.8.camel@srgsec> <20110717.033537.180999432921199548.hrs@allbsd.org> Content-Type: text/plain; charset="us-ascii" Date: Sun, 17 Jul 2011 10:30:26 +0800 Message-ID: <1310869826.2578.5.camel@srgsec> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-rc@FreeBSD.org Subject: Re: [patch] /etc/rc.d/routing X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jul 2011 02:30:28 -0000 On Sun, 2011-07-17 at 03:35 +0900, Hiroki Sato wrote: > Kevin Lo wrote > in <1310623300.37158.8.camel@srgsec>: > > ke> Hi, > ke> > ke> This patch removes "-n" from the echo. > ke> > ke> without the patch: > ke> Additional routing options: IPv4 gateway=YESadd net ::ffff:0.0.0.0: > ke> gateway ::1 > ke> add net ::0.0.0.0: gateway ::1 > ke> add net fe80::: gateway ::1 > ke> add net ff02::: gateway ::1 > ke> . > ke> > ke> with the patch: > ke> Additional routing options: IPv4 gateway=YES > ke> add net ::ffff:0.0.0.0: gateway ::1 > ke> add net ::0.0.0.0: gateway ::1 > ke> add net fe80::: gateway ::1 > ke> add net ff02::: gateway ::1 > ke> > ke> dougb@ doesn't see any problem. Per his request, send it to rc@ to be > ke> sure. > ke> > ke> Index: routing > ke> =================================================================== > ke> --- routing (revision 223907) > ke> +++ routing (working copy) > ke> @@ -287,7 +287,7 @@ > ke> > ke> if checkyesno gateway_enable; then > ke> ropts_init > ke> - echo -n ' IPv4 gateway=YES' > ke> + echo ' IPv4 gateway=YES' > ke> ${SYSCTL} net.inet.ip.forwarding=1 > /dev/null > ke> else > ke> ${SYSCTL} net.inet.ip.forwarding=0 > /dev/null > ke> @@ -322,7 +322,7 @@ > ke> { > ke> if checkyesno ipv6_gateway_enable; then > ke> ropts_init > ke> - echo -n ' IPv6 gateway=YES' > ke> + echo ' IPv6 gateway=YES' > ke> ${SYSCTL} net.inet6.ip6.forwarding=1 > /dev/null > ke> else > ke> ${SYSCTL} net.inet6.ip6.forwarding=0 > /dev/null > > This change is inconsistent and does not work for other combinations > of the options. The cause of the ugly output is that adding routes > and applying routing options are done in order in a per-AF basis, but > the "Additional routing options..." line is displayed only once. > > What do you think about the attached change? Right, jilles@ also pointed out that my change is inconsistent. Your patch looks good. Tested on -current and it works for me. Thanks! > -- Hiroki Kevin