From owner-freebsd-stable@FreeBSD.ORG Fri Dec 21 23:38:21 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B66D9FB1; Fri, 21 Dec 2012 23:38:21 +0000 (UTC) (envelope-from lukasz@wasikowski.net) Received: from bijou.wasikowski.net (mail.wasikowski.net [91.204.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id 2DF498FC0A; Fri, 21 Dec 2012 23:38:19 +0000 (UTC) Received: from mail.wasikowski.net (mail.wasikowski.net [91.204.91.44]) by bijou.wasikowski.net (Postfix) with ESMTP id D001DF07; Sat, 22 Dec 2012 00:38:10 +0100 (CET) X-Virus-Scanned: amavisd-new at wasikowski.net Received: from bijou.wasikowski.net ([IPv6:2001:6a0:1cb::b]) by mail.wasikowski.net (scan.wasikowski.net [IPv6:2001:6a0:1cb::b]) (amavisd-new, port 10026) with ESMTP id RQz4ubSMmGvU; Sat, 22 Dec 2012 00:38:10 +0100 (CET) Received: from [192.168.168.2] (89-72-12-251.dynamic.chello.pl [89.72.12.251]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: lukasz@wasikowski.net) by bijou.wasikowski.net (Postfix) with ESMTPSA id 40478F04; Sat, 22 Dec 2012 00:38:10 +0100 (CET) Message-ID: <50D4F2E4.7020600@wasikowski.net> Date: Sat, 22 Dec 2012 00:38:12 +0100 From: =?UTF-8?B?xYF1a2FzeiBXxIVzaWtvd3NraQ==?= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Kimmo Paasiala Subject: Re: ipv6_addrs_IF aliases in rc.conf(5) References: <50D1C553.9060100@wasikowski.net> <20121220132750.GB99616@stack.nl> In-Reply-To: X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org, freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Dec 2012 23:38:21 -0000 W dniu 2012-12-21 13:23, Kimmo Paasiala pisze: > On Fri, Dec 21, 2012 at 5:43 AM, Kimmo Paasiala wrote: >> On Thu, Dec 20, 2012 at 3:27 PM, Jilles Tjoelker wrote: >>> On Thu, Dec 20, 2012 at 01:04:34PM +0200, Kimmo Paasiala wrote: >>>> A question related to this for those who have been doing work on the >>>> rc(8) scripts. Can I assume that /usr/bin is available when >>>> network.subr functions are used? Doing calculations on hexadecimal >>>> numbers is going to be very awkward if I can't use for example bc(1). >>> >>> You cannot assume that /usr/bin is available when setting up the >>> network. It may be that /usr is mounted via NFS. >>> >>> You can use hexadecimal numbers (prefixed with 0x) in $((...)) >>> expressions. In FreeBSD 9.0 or newer, sh has a printf builtin you can >>> use; in older versions you can use hexdigit and hexprint from >>> network.subr. >>> >>> -- >>> Jilles Tjoelker >> >> Thanks, I've rewitten my patch to support ranges. It is attached in >> this message. >> >> Again it's against a very recent 9-STABLE, I still haven't found time >> to see if it applies to CURRENT. >> >> It does allow you to do crazy stuff like >> >> ipv6_addrs_re0="2001:db8:1111:2222::1-ffff/64" >> >> However I didn't find anything to limit the number of aliases in the >> ipv4 version of the function either. >> >> Please test it :) >> >> >> Then a question about the PR >> (http://www.freebsd.org/cgi/query-pr.cgi?pr=174225) I wrote, how can I >> attach this new patch to it? The submit follow up -button fires up my >> email client and I'm not so sure how to submit a new patch for the PR >> in an email in such a way that it appears properly formatted in the >> PR. >> >> Regards, >> >> Kimmo Paasiala > > PR updated with the new patch. Your patch applied cleanly, but it's not working or I am doing something wrong. root@freebsd:~ # uname -a FreeBSD freebsd 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #1 r244567: Fri Dec 21 23:57:28 CET 2012 root@freebsd:/usr/obj/usr/src/sys/GENERIC amd64 root@freebsd:~ # grep -Ev '^[[:space:]]*#|^$' /etc/rc.conf hostname="freebsd" ifconfig_em0="up" ipv4_addrs_em0="192.168.168.20-24/24" defaultrouter="192.168.168.1" ipv6_activate_all_interfaces="YES" ipv6_addrs_em0="2001:6a0:1cb::1-6/64" ipv6_defaultrouter="2001:6a0:1cb::ffff" sshd_enable="YES" dumpdev="NO" named_enable="YES" root@freebsd:~ # ifconfig em0: flags=8843 metric 0 mtu 1500 options=9b ether 08:00:27:02:83:71 inet6 fe80::a00:27ff:fe02:8371%em0 prefixlen 64 scopeid 0x1 inet 192.168.168.20 netmask 0xffffff00 broadcast 192.168.168.255 inet 192.168.168.21 netmask 0xffffffff broadcast 192.168.168.21 inet 192.168.168.22 netmask 0xffffffff broadcast 192.168.168.22 inet 192.168.168.23 netmask 0xffffffff broadcast 192.168.168.23 inet 192.168.168.24 netmask 0xffffffff broadcast 192.168.168.24 nd6 options=21 media: Ethernet autoselect (1000baseT ) status: active lo0: flags=8049 metric 0 mtu 16384 options=600003 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 inet 127.0.0.1 netmask 0xff000000 nd6 options=21 -- best regards, Lukasz Wasikowski