On Thu, Dec 28, 2006 at 09:20:19AM +0100, Bjvrn Ketelaars wrote:
> Marco S Hyman wrote:
> > > up giftunnel 212.182.166.172 64.71.128.81
> > > up inet6 2001:470:1F01:FFFF::1AE1 2001:470:1F01:FFFF::1AE0 prefixlen 128
> > > !route add -inet6 default 2001:470:1F01:FFFF::1AE0
> >
> >Mine looks like this (and it works just fine)
> >
> >----- hostname.gif0 -----
> >tunnel 208.201.244.208 208.201.234.221
> >inet6 alias 2001:05a8:0:1::0123 128
> >dest 2001:05a8:0:1::0122
> >! route add -inet6 default ::1
> >! route change -inet6 default -ifp gif0
> >----- hostname.gif0 -----
> >
> >With this setup route show also has the "route: illegal prefixlen" message.
> >Ignore it.  I don't think it has anything to do with your problem.
> >
> >// marc
> >
> 
> I used your hostname.gif0 as an example which, of course, gave the same 
> result. This means that I still experience the same problem.
> 
> When I try to setup rtadvd the daemon spits out:
> 
>       rtadvd[2175]: <ra_output> sendmsg on fxp1: No route to host
> 
> I have a gut feeling that this message is related to the "route: illegal 
> prefixlen" message.
> 

I doubt that. The "route: illegal prefixlen" message is a bad type
conversion in route(8) itself and the following diff resolves this issue.

I'm not using IPv6 and so I don't know what your rtadvd issue is.

-- 
:wq Claudio

Index: sbin/route/show.c
===================================================================
RCS file: /cvs/src/sbin/route/show.c,v
retrieving revision 1.55
diff -u -p -r1.55 show.c
--- sbin/route/show.c   17 Nov 2006 01:11:23 -0000      1.55
+++ sbin/route/show.c   28 Dec 2006 13:29:07 -0000
@@ -677,7 +677,7 @@ netname6(struct sockaddr_in6 *sa6, struc
        masklen = 0;
        if (mask) {
                lim = mask->sin6_len - offsetof(struct sockaddr_in6, sin6_addr);
-               lim = lim < sizeof(struct in6_addr) ?
+               lim = lim < (int)sizeof(struct in6_addr) ?
                    lim : sizeof(struct in6_addr);
                for (p = (u_char *)&mask->sin6_addr, i = 0; i < lim; p++) {
                        if (final && *p) {
Index: usr.bin/netstat/show.c
===================================================================
RCS file: /cvs/src/usr.bin/netstat/show.c,v
retrieving revision 1.3
diff -u -p -r1.3 show.c
--- usr.bin/netstat/show.c      17 Nov 2006 01:11:23 -0000      1.3
+++ usr.bin/netstat/show.c      28 Dec 2006 13:30:42 -0000
@@ -683,7 +683,7 @@ netname6(struct sockaddr_in6 *sa6, struc
        masklen = 0;
        if (mask) {
                lim = mask->sin6_len - offsetof(struct sockaddr_in6, sin6_addr);
-               lim = lim < sizeof(struct in6_addr) ?
+               lim = lim < (int)sizeof(struct in6_addr) ?
                    lim : sizeof(struct in6_addr);
                for (p = (u_char *)&mask->sin6_addr, i = 0; i < lim; p++) {
                        if (final && *p) {

Reply via email to