From owner-freebsd-net@freebsd.org Thu Feb 4 04:25:31 2021 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 554FA5371E4 for ; Thu, 4 Feb 2021 04:25:31 +0000 (UTC) (envelope-from shamaz.mazum@gmail.com) Received: from mail-oo1-xc32.google.com (mail-oo1-xc32.google.com [IPv6:2607:f8b0:4864:20::c32]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DWQT649ryz4n5Y for ; Thu, 4 Feb 2021 04:25:30 +0000 (UTC) (envelope-from shamaz.mazum@gmail.com) Received: by mail-oo1-xc32.google.com with SMTP id y21so452261oot.12 for ; Wed, 03 Feb 2021 20:25:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=J46fuBRZPstdKYM+6uQsFCXGV+dPpG0BZgu4KCB0vQU=; b=F0n2S8HXoJSHDt4jeuFw5UqfC097Dml/q7XdDflM9fY3EgMpVLc+ViAb8KBxu2t+iO xm2rxwxf5JoUlHSNfzqPAa8NTIRkKPgb8S/HSLDi9LXK+ZJ5pYkN7DPrXtjkZ2DzIKVm //jKrRBHOSEydhxCqNuSpNRpoe7OB3wVcdECk9c/3kkobsKjFv2uhXp+Ukv/l60mp4jO OPM4I6UAiHInQ5gHxvslet8RlL454pAdyyzUsHOtbVKXOom3Olb0Qb8H1aB6WgZgZJ+X QyYe85sOwnA5T4iVEJmXLqoJWtKlaDQCwkE2ntBbCreX7EHwpa33AF2n8ZalXNHULned oYUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=J46fuBRZPstdKYM+6uQsFCXGV+dPpG0BZgu4KCB0vQU=; b=VdlKu2Is9/1UZmb7xQEDRq4GD50pxCpmJWu0yu8N6M9YVrS/OBHQ5TnlP7SiQRFzeu eDxHChIMMDPrLkLhRXZrHALPkrLwSlOJh0NkZ82pC73kZtRHs0UjmWUzE/DMaWZixLGh le+eyg2zQM35kyWWrGuCphxy8oGxuCRTOXg3wb/K+9Qzo0ot3TmNg0bHAbEzQWF6lVDM QRuZALSjxj1DYLoN/tbdHUT1b2m4IQlV7rWB3yj1zD5yAyh54KMlhJZy3h5UWhfGEa4N hr/M9FC4LswLXUj70GCdV4C1L3SOwSiW0Ydo9XZ42IAec0HM5Mp14BEAwVhTQ/xp/6I8 trvw== X-Gm-Message-State: AOAM533A2Y7yeCrzBWmMSRgtxGQx8ELE0RgH0Ap7rx5UB/fBpcfsemSm g+kXA/uiLUu+76ZpOt+Yxx9EHC+CdsyZIAjM8kwfGjX6VCc= X-Google-Smtp-Source: ABdhPJwmKG5GOJCfMZ0cz6fFbNaWDTpKfjbP85Q5Ek4tZKTju7l7MFm/FvXYCBUAAAS3vgrzmYtzUW21aJTKALG7d84= X-Received: by 2002:a4a:970b:: with SMTP id u11mr4441978ooi.79.1612412728990; Wed, 03 Feb 2021 20:25:28 -0800 (PST) MIME-Version: 1.0 References: <6d9afa54-d0be-df3e-9377-e19243279a70@plan-b.pwste.edu.pl> In-Reply-To: From: Vasily Postnicov Date: Thu, 4 Feb 2021 07:25:16 +0300 Message-ID: Subject: Re: new in-kernel wireguard and IPv6 endpoint To: Marek Zarychta Cc: freebsd-net@freebsd.org X-Rspamd-Queue-Id: 4DWQT649ryz4n5Y X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=F0n2S8HX; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of shamazmazum@gmail.com designates 2607:f8b0:4864:20::c32 as permitted sender) smtp.mailfrom=shamazmazum@gmail.com X-Spamd-Result: default: False [-4.00 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::c32:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::c32:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::c32:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-net] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2021 04:25:31 -0000 If the endpoint does not use the same WireGuard implementation from FreeBSD, try to cherry-pick this commit first and then rebuild and reinstall the kernel. https://cgit.freebsd.org/src/commit/?id=3D5aaea4b99e5cc724e97e24a68876e8768= d3d8012 =D1=81=D1=80, 3 =D1=84=D0=B5=D0=B2=D1=80. 2021 =D0=B3., 23:13 Marek Zarycht= a : > W dniu 21.01.2021 o 20:03, Marek Zarychta pisze: > > Dear subscribers, > > > > please let me know if is it possible to use IPv6 addressed endpoint > > for the tunnel? I have tried to specify the address enclosed in [] > > followed by the port number, for example: [2001:db8:0:1::1]:54333, > > have tried without it: 2001:db8:0:1::1:54333. I have also tried to > > specify it with prefix length, like this one: > > [2001:db8:0:1::1]/128:54333, but neither works. > > > > I got only some errors: > > > > matchaddr failed > > peer not found - dropping 0xfffff802099b6700 > > wg0: wg_peer_add bad length for endpoint 28 > > > > Is it possible to utilize IPv6 address as an endpoint for the tunnel > > with this implementation? > > > > > There was not much feedback on the mailing list, so I changed the code a > bit to not validate endpoint length so strictly and check if IPv6 > address as endpoint is supported. This resulted in a partial success. > The handshake over IPv6 looks like established from the endpoint (as > it's reported by "wg show" command), but the tunnel is neither capable > to carry any data nor keepalives are send. > > Here is the handshake as sniffed on the endpoint: > > 00:00:00.000000 IP6 (hlim 57, next-header UDP (17) payload length: 156) > 2001:db8:d47::c:100d.12345 > 2001:db8::b.55667: [udp sum ok] UDP, length > 148 > 00:00:00.002860 IP6 (hlim 64, next-header UDP (17) payload length: 100) > 2001:db8::b.55667 > 2001:db8:d47::c:100d.12345: [bad udp cksum 0x6f50 -> > 0x62b4!] UDP, length 92 > 00:00:00.000892 IP6 (hlim 57, next-header UDP (17) payload length: 120) > 2001:db8:d47::c:100d.12345 > 2001:db8::b.55667: [udp sum ok] UDP, length > 112 > > Perhaps the incompatibility with IPv6 should be mentioned at least in > just added wg(4) manual page[1]? > > [1] https://cgit.freebsd.org/src/commit/?id=3De59d9cb41284 > > -- > Marek Zarychta > > > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >