]> git.ozlabs.org Git - ppp.git/commitdiff
pppd: Fix setting flags of IPv6 peer address
authorPali Rohár <pali@kernel.org>
Sun, 10 Jan 2021 17:51:23 +0000 (18:51 +0100)
committerPali Rohár <pali@kernel.org>
Mon, 15 Feb 2021 22:37:32 +0000 (23:37 +0100)
Address is link-local (not globaly routable) and is permanent (not dynamic
from stateless address configuration).

Signed-off-by: Pali Rohár <pali@kernel.org>
pppd/sys-linux.c

index 50c4f2dab40313e018d5c83432fd2953a895d31f..a7508fe3989601278c667bf3fb150a12afcb70c8 100644 (file)
@@ -2885,8 +2885,8 @@ static int append_peer_ipv6_address(unsigned int iface, struct in6_addr *local_a
     ifa = NLMSG_DATA(nlmsg);
     ifa->ifa_family = AF_INET6;
     ifa->ifa_prefixlen = 128;
-    ifa->ifa_flags = 0;
-    ifa->ifa_scope = RT_SCOPE_UNIVERSE;
+    ifa->ifa_flags = IFA_F_PERMANENT;
+    ifa->ifa_scope = RT_SCOPE_LINK;
     ifa->ifa_index = iface;
 
     local_rta = IFA_RTA(ifa);