Date: Sun, 17 Jul 2011 10:30:26 +0800 From: Kevin Lo <kevlo@kevlo.org> To: Hiroki Sato <hrs@FreeBSD.org> Cc: freebsd-rc@FreeBSD.org Subject: Re: [patch] /etc/rc.d/routing Message-ID: <1310869826.2578.5.camel@srgsec> In-Reply-To: <20110717.033537.180999432921199548.hrs@allbsd.org> References: <1310623300.37158.8.camel@srgsec> <20110717.033537.180999432921199548.hrs@allbsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 2011-07-17 at 03:35 +0900, Hiroki Sato wrote: > Kevin Lo <kevlo@kevlo.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1310869826.2578.5.camel>