#10 encode and decode IPv6-Addresses

closed-accepted
nobody
None
5
2012-03-17
2011-06-23
No

Hello,

mybe you've heard of that rumors about IPv4-Address-Space? ;)

I think sometimes we would need IPv6-Addresses in docsis-configfiles so I've written a patch adding
encode_ip6 and decode_ip6 to docsis.

I've lent the regexp for IPv6-Addresses from http://www.regexlib.com but haven't foud anything about copyright-advise.
so I put the Link inside docsis_lex.c.

Hope this is of interest for implementation.

regards,
Benedikt

Discussion

  • I've found the copyright for that regex in the sourcefile:

    http://sshguard.svn.sourceforge.net/viewvc/sshguard/trunk/src/regexlib.h?revision=181&view=markup

    /*
    2 * Copyright (c) 2010 Mij <mij@sshguard.net>
    3 *
    4 * Permission to use, copy, modify, and distribute this software for any
    5 * purpose with or without fee is hereby granted, provided that the above
    6 * copyright notice and this permission notice appear in all copies.
    7 *
    8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
    9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
    11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
    14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    15 */
    16
    17 /*
    18 * SSHGuard. See http://www.sshguard.net
    19 */

    regards,
    Benedikt

     
  • Richard Laager
    Richard Laager
    2011-06-24

    Can you resubmit the patch as a unified diff (diff -u)? Do you have a DOCSIS configuration file that uses an IPv6 address that you've confirmed works? The test cases should be expanded to test this new option.

    Also, it looks to me like there are some unrelated usage message changes? If so, can those be separated into a different patch?

     
  • Hello Richard,

    I've resubmitted the patch with a diff -u.

    At this time I've not an IPv6-Environment for cablemodems but this may change in the
    next weeks so I just prepered for this.

    As there should not be any difference in handling TLVs between IPv6 and IPv4 I don't
    expect any issues there.

    For testing the functions I've just added:

    SwUpgradeServer 192.168.1.1;
    SwUpgradeServer6 DEB8:234::1;

    to the configfile. The following formats are supported by the IPv6-Regex:

    2001:470:b0b4:1:280:c6ff:fef2:9410
    2001:868:100::3
    2001:888:144a::a441:888:1002
    ::1
    a:b::
    ::FFFF:1.2.3.4

    I hope this helps,

    best regards,
    Benedikt

     
  • Richard Laager
    Richard Laager
    2012-03-17

    I've accepted this as 8498173494d604f6c16afb82d84ae4267b811242. I made some changes in a follow-up revision, including adding a really basic test case.

     
  • Richard Laager
    Richard Laager
    2012-03-17

    • status: open --> closed-accepted