Date: Sat, 22 Dec 2012 00:38:12 +0100 From: =?UTF-8?B?xYF1a2FzeiBXxIVzaWtvd3NraQ==?= <lukasz@wasikowski.net> To: Kimmo Paasiala <kpaasial@gmail.com> Cc: freebsd-current@freebsd.org, freebsd-stable@freebsd.org Subject: Re: ipv6_addrs_IF aliases in rc.conf(5) Message-ID: <50D4F2E4.7020600@wasikowski.net> In-Reply-To: <CA%2B7WWSc-VwdmYBEtZwO03x-p2o7-eUr9bWrhMhjBCUSah_0v_A@mail.gmail.com> References: <CA%2B7WWSftYL7zjdXmSbapXHJvSAMJrKY2Un6yt4L=RkOu1eq8mw@mail.gmail.com> <CA%2B7WWSe8Qx17ZMjdugSJQKEsqXcJ0Ds1hHUZi-3mMw2KN971RA@mail.gmail.com> <50D1C553.9060100@wasikowski.net> <CA%2B7WWSewg%2BQqcn1L508tAiBY1zLQfne6AC6w7oAco3y=efcX9w@mail.gmail.com> <CA%2B7WWSeibFGNSwtjUeK-U6irj6axGftAHJC2eYU3tQoeM0JRpA@mail.gmail.com> <20121220132750.GB99616@stack.nl> <CA%2B7WWSdqjkZq1y0dyxV9LiycNA0V%2BCyEKt9x0d%2BWJaaWC4SXSg@mail.gmail.com> <CA%2B7WWSc-VwdmYBEtZwO03x-p2o7-eUr9bWrhMhjBCUSah_0v_A@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
W dniu 2012-12-21 13:23, Kimmo Paasiala pisze: > On Fri, Dec 21, 2012 at 5:43 AM, Kimmo Paasiala <kpaasial@gmail.com> wrote: >> On Thu, Dec 20, 2012 at 3:27 PM, Jilles Tjoelker <jilles@stack.nl> 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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM> 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<PERFORMNUD,AUTO_LINKLOCAL> media: Ethernet autoselect (1000baseT <full-duplex>) status: active lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6> inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 inet 127.0.0.1 netmask 0xff000000 nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL> -- best regards, Lukasz Wasikowski
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50D4F2E4.7020600>