On Linux IPv6 peer address cannot be set via SIOCSIFDSTADDR ioctl like it
is for IPv4 peer address. Linux kernel does not support SIOCSIFDSTADDR for
AF_INET6 PPP interfaces.
The only way how to set IPv6 peer address on Linux is via kernel netlink
interface which is just a little bit complicated compared to one ioctl
call.
Linux kernel for a long time automatically adds IPv6 peer address from
interface into route table so it is not needed to explicitly set routing
for remote peer address. pppd already does not do it for kernel versions
newer than 2.1.16. So the same check is used also for IPv6 peer route
address.
Prior this patch ppp interface was configured as:
$ ip -6 address show dev ppp0
2: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 state UNKNOWN qlen 3
inet6 fe80::2/128 scope link
valid_lft forever preferred_lft forever
$ ip -6 route show dev ppp0
fe80::1 metric 1 pref medium
fe80::2 proto kernel metric 256 pref medium
And after applying this patch as:
$ ip -6 address show dev ppp0
2: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 state UNKNOWN qlen 3
inet6 fe80::2 peer fe80::1/128 scope link
valid_lft forever preferred_lft forever
$ ip -6 route show dev ppp0
fe80::1 proto kernel metric 256 pref medium
fe80::2 proto kernel metric 256 pref medium
As can be seen IPv6 peer address is now correctly set on the interface and
also kernel correctly fill route table for IPv6 peer address.
Please note that old ifconfig utility cannot show nor change IPv6 peer
address. Peer address is supported only for IPv4 addresses as opposite of
the local addresses where both IPv4 and IPv6 are supported. It is because
old ifconfig utility is also using ioctl interface which cannot handle it.
Therefore for any testing it is really required ip utility or other utility
with netlink interface (and not ioctl interface).