From owner-freebsd-rc@FreeBSD.ORG Fri Jul 9 19:36:27 2010 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 06CCE106566C for ; Fri, 9 Jul 2010 19:36:27 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [IPv6:2001:470:a803::1]) by mx1.freebsd.org (Postfix) with ESMTP id 4726A8FC14 for ; Fri, 9 Jul 2010 19:36:26 +0000 (UTC) Received: from mail.geekcn.org (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id 7B9D4A5A79B; Sat, 10 Jul 2010 03:36:23 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by mail.geekcn.org (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with LMTP id svtpo-HQHJj1; Sat, 10 Jul 2010 03:36:17 +0800 (CST) Received: from delta.delphij.net (drawbridge.ixsystems.com [206.40.55.65]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id 7204AA5A6DB; Sat, 10 Jul 2010 03:36:15 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=miwQx1x+261dCfOVhX9uygND6t3q5+WRIsIxeqyssq4wmnoMdLiNFTRoXC0ZGcLLa kDER6exxNepgFhXsaXkYA== Message-ID: <4C377A2D.2000507@delphij.net> Date: Fri, 09 Jul 2010 12:36:13 -0700 From: Xin LI Organization: The Geek China Organization User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.10) Gecko/20100629 Thunderbird/3.0.5 ThunderBrowse/3.3 MIME-Version: 1.0 To: Frank Bartels References: <20100709145521.GA60438@server-king.de> In-Reply-To: <20100709145521.GA60438@server-king.de> X-Enigmail-Version: 1.0.1 OpenPGP: id=3FCA37C1; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: freebsd-rc@FreeBSD.ORG Subject: Re: rc.d/static_arp for v6: static_ndp X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net 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: Fri, 09 Jul 2010 19:36:27 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 2010/07/09 07:55, Frank Bartels wrote: > Hi, > > I've just noticed we have rc.d/static_arp for a while now, but the > v6 counterpart is missing: I'd call it static_ndp. > > So I took rc.d/static_arp and patched it. ndp does not know about > -S (deleting old entry first), so I've just changed it to -s. Maybe > someone is able to add -S to ndp, otherwise one should add -d line > before -s. Wouldn't -s replace existing entry? Testing on link-local entry seems that -s would just replace it... > rc.conf works the same way: > > static_ndp_pairs="gateway" > static_ndp_gateway="2001:db8:120:9260::1 00:26:ff:ff:ff:ff" > > --- /etc/rc.d/static_arp 2010-07-09 15:25:08.929932175 +0200 > +++ /usr/local/etc/rc.d/static_ndp 2010-07-09 16:39:20.396958047 +0200 > @@ -24,46 +24,46 @@ > # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > # SUCH DAMAGE. > # > -# Configure static ARP table > +# Configure static NDP table > # > -# $FreeBSD: src/etc/rc.d/static_arp,v 1.4.2.2.2.1 2010/06/14 02:09:06 kensmith Exp $ > +# $FreeBSD$ > # > > -# PROVIDE: static_arp > +# PROVIDE: static_ndp > # REQUIRE: netif > # KEYWORD: nojail > > . /etc/rc.subr > > -name="static_arp" > -start_cmd="static_arp_start" > -stop_cmd="static_arp_stop" > +name="static_ndp" > +start_cmd="static_ndp_start" > +stop_cmd="static_ndp_stop" > > > -static_arp_start() > +static_ndp_start() > { > - local e arp_args > + local e ndp_args > > - if [ -n "${static_arp_pairs}" ]; then > - echo -n 'Binding static ARP pair(s):' > - for e in ${static_arp_pairs}; do > + if [ -n "${static_ndp_pairs}" ]; then > + echo -n 'Binding static NDP pair(s):' > + for e in ${static_ndp_pairs}; do > echo -n " ${e}" > - eval arp_args=\$static_arp_${e} > - arp -S ${arp_args} >/dev/null 2>&1 > + eval ndp_args=\$static_ndp_${e} > + ndp -s ${ndp_args} >/dev/null 2>&1 > done > echo '.' > fi > } > > -static_arp_stop() > +static_ndp_stop() > { > - local e arp_args > + local e ndp_args > > - if [ -n "${static_arp_pairs}" ]; then > - echo -n 'Unbinding static ARP pair(s):' > - for e in ${static_arp_pairs}; do > + if [ -n "${static_ndp_pairs}" ]; then > + echo -n 'Unbinding static NDP pair(s):' > + for e in ${static_ndp_pairs}; do > echo -n " ${e}" > - eval arp_args=\$static_arp_${e} > - arp -d ${arp_args%%[ ]*} > /dev/null 2>&1 > + eval ndp_args=\$static_ndp_${e} > + ndp -d ${ndp_args%%[ ]*} > /dev/null 2>&1 > done > echo '.' > fi > > It seems this "hack" is needed for the native v6 connectity provided > by Hetzner (German hosting provider). > > Cheers, > Knarf > _______________________________________________ > freebsd-rc@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-rc > To unsubscribe, send any mail to "freebsd-rc-unsubscribe@freebsd.org" > - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (FreeBSD) iQEcBAEBCAAGBQJMN3otAAoJEATO+BI/yjfBKUwH/1TIu23FlEvVgrvparGNCyMF sgtlDziOUHm1JTRacVVxSaexCJUnQ6IAXOA71YKRYWg9AvEqxyNTFx3cN6Cljag8 d/aPIS0hRDxZwtnkJfLjtlvHRziVy2HlQGEK3r/znKj5X6HILEci3QYuqUCtYy8E l7AxwJGlkqt5nN9lGI5jvxxDCmVk9Lz/rCB/9XQY+GPyqnPjHCKINz/tLMg8UcKc o0mTfbuZ52LVbg809CkCBAFvGZAk0KI83bmO8IYGy15D+UbUJC08q+BAJ2D5B07E 5/ObFwEEDtBQEm1dfdqCk4uwbx0xCHSk8eOt28PIFTH47GokVFk1FBtdUYWFkXM= =GfvC -----END PGP SIGNATURE-----