Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: prefixlen of IPv6 over PPP
From: christos%astron.com@localhost (Christos Zoulas)
Subject: Re: prefixlen of IPv6 over PPP
Date: Tue, 10 Nov 2009 22:15:04 +0000 (UTC)
http://mail-index.netbsd.org/current-users/2009/11/10/msg011139.html
> In article <20091108.114051.241895082.nagae%eagan.jp@localhost>,
> Nagae Hidetake <nagae%eagan.jp@localhost> wrote:
>>I attached a patch to src/usr.sbin/pppd/pppd/sys-bsd.c.
>>It makes pppd not to set destination address and set prefixlen 64.
>>Setting destination address with prefix 64 is rejected by
>>in6_update_ifa1 defined in src/sys/netinet6/in6.c.
>>PPTP connection with this patch accepts prefix advertised through RA.
>>
>>I think this is the way pppoe handles IPv6 Link-Local address.
>>Is this a correct solution?
> Does this patch work for you? Linux uses a 10 bit prefixlen...
Thank you. Your patch also works fine in my environment.
Here is the output of ifconfig.
ppp0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
inet XXX.XXX.XXX.XXX -> YYY.YYY.YYY.YYY netmask 0xffffff00
inet6 fe80::216:d3ff:fe38:ba9d%ppp0 -> prefixlen 64 scopeid 0x5
ppp1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1280
inet6 fe80::ccfb:86b3:7b75:9470%ppp1 -> prefixlen 64 scopeid 0x6
inet6 2001:240:bb8a:d9:ccfb:86b3:7b75:9470 -> prefixlen 64
> - sizeof(addreq6.ifra_prefixmask.sin6_addr));
> + sizeof(addreq6.ifra_prefixmask.sin6_addr) - sizeof(our_eui64));
> + memset(&addreq6.ifra_prefixmask.sin6_addr+sizeof(our_eui64), 0x00,
> + sizeof(our_eui64));
More strictly, start address of the second memset shoud be
&addreq6.ifra_prefixmask.sin6_addr+sizeof(struct sockaddr_in6)-sizeof(our_euc64)
# 10 bit prefixlen!? It's interesting...
--
Nagae Hidetake nagae%eagan.jp@localhost
http://www.eagan.jp/nagae/
Home |
Main Index |
Thread Index |
Old Index