]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
ppp: add comment about likely meaninglessness of server's LL IPv6 address
authorDaniel Lenski <dlenski@gmail.com>
Wed, 24 Feb 2021 04:51:12 +0000 (20:51 -0800)
committerDaniel Lenski <dlenski@gmail.com>
Mon, 29 Mar 2021 02:27:01 +0000 (19:27 -0700)
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
ppp.c

diff --git a/ppp.c b/ppp.c
index 9d0c0322aaa485e38ef0cd47a4eeccc18acd9e44..86d9682dfd28f5c8682107e2913e779209f45938 100644 (file)
--- 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)))