Date: Fri, 09 Jul 2010 12:36:13 -0700 From: Xin LI <delphij@delphij.net> To: Frank Bartels <freebsd@knarf.de> Cc: freebsd-rc@FreeBSD.ORG Subject: Re: rc.d/static_arp for v6: static_ndp Message-ID: <4C377A2D.2000507@delphij.net> In-Reply-To: <20100709145521.GA60438@server-king.de> References: <20100709145521.GA60438@server-king.de>
next in thread | previous in thread | raw e-mail | index | archive | help
-----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 <delphij@delphij.net> 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-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C377A2D.2000507>