From owner-freebsd-rc@FreeBSD.ORG Fri Jul 9 14:55:25 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 5AB39106566B for ; Fri, 9 Jul 2010 14:55:25 +0000 (UTC) (envelope-from freebsd@knarf.de) Received: from mail.server-king.de (mail.server-king.de [IPv6:2001:6f8:1d0d::10]) by mx1.freebsd.org (Postfix) with ESMTP id 032F18FC0A for ; Fri, 9 Jul 2010 14:55:24 +0000 (UTC) Received: from cheese.server-king.de (localhost [127.0.0.1]) by mail.server-king.de (8.14.4/8.14.4) with ESMTP id o69EtMUm030556 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 9 Jul 2010 16:55:22 +0200 (CEST) (envelope-from freebsd@knarf.de) DomainKey-Signature: a=rsa-sha1; s=mail.server-king.de; d=knarf.de; c=nofws; q=dns; h=dkim-signature:received: x-authentication-warning:date:from:to:subject:message-id:mime-version:content-type: content-disposition:user-agent:x-greylist; b=lkfIYKjXsO+PHfzw2Vm1ubss4bkMttM3idMvQVkPFBMdp3JdNVmgYAu6Zw7ey9FcM niK1grt1Fuu/t/am8hriQK860ENKgusxKAJCFY4ABcCIp5xI1QxyMRRTlUPO+cKjvvL HgEl1R8b8axdukt38OKGd967EgMqan3zNTXPNbI= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=knarf.de; s=mail.server-king.de; t=1278687322; bh=DXgNhU8o9Ke5Kx2TzLmlPhJwsn+aOkutbLyyhT8z0go=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type; b=OnesNZepol0H9ZuaUdoYFK+cnGVG54YoA60y5u4+ofBVbwhr7n+K2eOjMwlN58kzb smbPMmS9kUs/ql01BFGu1eXyPtszeZcbv+ze/hpnRtIX9eDtUKWmTNRp0agB+0XLXc kispIP8GPosc5y7Yz8DphaFjndC3dXeGbK5ZRFws= Received: (from knarf@localhost) by cheese.server-king.de (8.14.4/8.14.4/Submit) id o69EtLeg030549 for freebsd-rc@freebsd.org; Fri, 9 Jul 2010 16:55:21 +0200 (CEST) (envelope-from freebsd@knarf.de) X-Authentication-Warning: cheese.server-king.de: knarf set sender to freebsd@knarf.de using -f Date: Fri, 9 Jul 2010 16:55:21 +0200 From: Frank Bartels To: freebsd-rc@freebsd.org Message-ID: <20100709145521.GA60438@server-king.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.5 (mail.server-king.de [127.0.0.1]); Fri, 09 Jul 2010 16:55:22 +0200 (CEST) Subject: rc.d/static_arp for v6: static_ndp 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: Fri, 09 Jul 2010 14:55:25 -0000 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. 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