Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: gif and ipv6 problems



On Sun, Jun 29, 2008 at 08:38:05PM -0500, M Graff wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I have a IPv6 tunnel over 'gif' to my home.  Previously, I was able to
> have this in /etc/ifconfig.gif:
> 
>       create
>       tunnel <my-ipv6> <their-ipv4>
>       inet 149.20.65.101/31 149.20.65.100
>       inet6 2001:4f8:0:1::26:2 prefixlen 112
>       ! /sbin/route -n add -inet6 default 2001:4f8:0:1::26:1
> 
> and it just worked.
> 
> However, now this command fails:
> 
>       # ifconfig gif0 inet6 2001:4f8:0:1::26:2 prefixlen 112
>       ifconfig: no point-to-point destination address

Try the attached patch.

Dave

-- 
David Young             OJC Technologies
dyoung%ojctech.com@localhost      Urbana, IL * (217) 278-3933 ext 24
Index: af_inetany.c
===================================================================
RCS file: /cvsroot/src/sbin/ifconfig/af_inetany.c,v
retrieving revision 1.11
diff -p -u -u -p -r1.11 af_inetany.c
--- af_inetany.c        3 Jun 2008 04:59:30 -0000       1.11
+++ af_inetany.c        30 Jun 2008 16:31:39 -0000
@@ -135,20 +133,17 @@ commit_address(prop_dictionary_t env, pr
        case 0:
                break;
        case IFF_POINTOPOINT:
-               if (dst == NULL) {
-                       errx(EXIT_FAILURE, "no point-to-point "
-                            "destination address");
-               }
                if (brd != NULL) {
                        errx(EXIT_FAILURE, "%s is not a broadcast interface",
                            ifname);
                }
-               loadbuf(&param->dst, dst);
+               if (dst != NULL)
+                       loadbuf(&param->dst, dst);
                break;
        case IFF_BROADCAST|IFF_POINTOPOINT:
                errx(EXIT_FAILURE, "unsupported interface flags");
        }
        if (mask != NULL)
                loadbuf(&param->mask, mask);
        else if (param->defmask.buf != NULL) {
                memcpy(param->mask.buf, param->defmask.buf,


Home | Main Index | Thread Index | Old Index