Re: ipv6_addrs_IF aliases in rc.conf(5)

From: Kimmo Paasiala <kpaasial_at_gmail.com>
Date: Fri, 21 Dec 2012 14:23:30 +0200
On Fri, Dec 21, 2012 at 5:43 AM, Kimmo Paasiala <kpaasial_at_gmail.com> wrote:
> On Thu, Dec 20, 2012 at 3:27 PM, Jilles Tjoelker <jilles_at_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.

-Kimmo
Received on Fri Dec 21 2012 - 11:23:37 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:33 UTC