From 65564c3a433bcefb3d6ab95826ace7a8ee59f465 Mon Sep 17 00:00:00 2001 From: Daniel Lenski Date: Tue, 23 Feb 2021 20:51:12 -0800 Subject: [PATCH] ppp: add comment about likely meaninglessness of server's LL IPv6 address Signed-off-by: Daniel Lenski --- ppp.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ppp.c b/ppp.c index 9d0c0322..86d9682d 100644 --- a/ppp.c +++ b/ppp.c @@ -413,6 +413,14 @@ static int handle_config_request(struct openconnect_info *vpninfo, case PROTO_TAG_LEN(PPP_IP6CP, IP6CP_INT_ID, 8): { char buf[40]; unsigned char ipv6_ll[16] = {0xfe, 0x80, 0, 0, 0, 0, 0, 0}; + + /* XX: The server has allegedly sent us its link-local IPv6 address. + * However, on the only server I have access to which supports IPv6, + * this is just a random/garbage value, and `ping6 -I $TUNDEV $THIS_LL_ADDRESS` + * returns an "unreachable" result from the server's actual LL address, + * which is not sent over PPP configuration. This is probably just an + * ignorable vestige of before the days of IPv6 address autoconfiguration. + */ memcpy(ipv6_ll + 8, p+2, 8); memcpy(&ppp->in_ipv6_addr, ipv6_ll, 16); if (!inet_ntop(AF_INET6, &ppp->in_ipv6_addr, buf, sizeof(buf))) -- 2.49.0