From owner-freebsd-net@freebsd.org Sun Aug 30 12:03:30 2020 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 62DA83B8CC7 for ; Sun, 30 Aug 2020 12:03:30 +0000 (UTC) (envelope-from peter@libassi.se) Received: from smtp.outgoing.loopia.se (smtp.outgoing.loopia.se [93.188.3.37]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BfX6T2Zmlz3cmm for ; Sun, 30 Aug 2020 12:03:29 +0000 (UTC) (envelope-from peter@libassi.se) Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id DF250704FE1 for ; Sun, 30 Aug 2020 14:03:25 +0200 (CEST) Received: from s499.loopia.se (unknown [172.22.191.6]) by s807.loopia.se (Postfix) with ESMTP id C0F562E6B891 for ; Sun, 30 Aug 2020 14:03:25 +0200 (CEST) Received: from s475.loopia.se (unknown [172.22.191.6]) by s499.loopia.se (Postfix) with ESMTP id BE23E1CDBFC5 for ; Sun, 30 Aug 2020 14:03:25 +0200 (CEST) X-Virus-Scanned: amavisd-new at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1 X-Spam-Level: X-Spam-Status: No, score=-1 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1] autolearn=disabled Received: from s498.loopia.se ([172.22.191.5]) by s475.loopia.se (s475.loopia.se [172.22.190.15]) (amavisd-new, port 10024) with LMTP id LObZPZtrN9Hh for ; Sun, 30 Aug 2020 14:03:25 +0200 (CEST) X-Loopia-Auth: user X-Loopia-User: peter@libassi.se X-Loopia-Originating-IP: 78.82.159.46 Received: from [10.79.0.17] (c-2e9f524e.03-77-73746f30.bbcust.telenor.se [78.82.159.46]) (Authenticated sender: peter@libassi.se) by s498.loopia.se (Postfix) with ESMTPSA id 4DF01471A08 for ; Sun, 30 Aug 2020 14:03:25 +0200 (CEST) From: Peter Libassi Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\)) Subject: wireguard integration D26137 test on 13-CURRENT r364973 Message-Id: Date: Sun, 30 Aug 2020 14:03:24 +0200 To: freebsd-net@freebsd.org X-Mailer: Apple Mail (2.3608.120.23.2.1) X-Rspamd-Queue-Id: 4BfX6T2Zmlz3cmm X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of peter@libassi.se has no SPF policy when checking 93.188.3.37) smtp.mailfrom=peter@libassi.se X-Spamd-Result: default: False [0.79 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; MV_CASE(0.50)[]; TO_DN_NONE(0.00)[]; NEURAL_HAM_SHORT(-0.24)[-0.239]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:39570, ipnet:93.188.2.0/23, country:SE]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.81)[-0.809]; RCVD_COUNT_FIVE(0.00)[6]; FREEFALL_USER(0.00)[peter]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; DMARC_NA(0.00)[libassi.se]; NEURAL_SPAM_LONG(0.44)[0.436]; RCVD_IN_DNSWL_NONE(0.00)[93.188.3.37:from]; MIME_TRACE(0.00)[0:+]; R_SPF_NA(0.00)[no SPF record]; RWL_MAILSPIKE_POSSIBLE(0.00)[93.188.3.37:from]; MAILMAN_DEST(0.00)[freebsd-net] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Aug 2020 12:03:30 -0000 I had a first look at the latest version of the wireguard kernel = integration. There was some findings that may need attention. buildkernel stops with kernel option INVARIANTS enabled: --- all_subdir_if_wg --- /usr/src/sys/dev/if_wg/module/if_wg_session.c:1639:22: error: unused = variable 'e' [-Werror,-Wunused-variable] struct wg_endpoint *e =3D wg_mbuf_endpoint_get(m); ^ 2 errors generated. *** [if_wg_session.o] Error code 1 buildkernel KERNCONF=3D"GENERIC-NODEBUG" works fine. I managed to figure out these options to the ifconfig command: # ifconfig wg create private-key = AtT4BNuidrJrDGZUH1Ddd4e6D0HMCq3Z+KawQVZQqXU=3D listen-port 9999 peer = public-key bmUgcaOtlEFcIoSlwPQ3qO/c14nJHYr+a7Ms/kJmOFA=3D endpoint = 192.168.4.4:8888 allowed-ips 10.2.3.0/24 which seems to get everything in place. However peer-list shows the = allowed ips in a funny way: # ifconfig wg0 peer-list [Peer] PublicKey =3D bmUgcaOtlEFcIoSlwPQ3qO/c14nJHYr+a7Ms/kJmOFA Endpoint =3D 192.168.4.4:8888 AllowedIPs =3D 0.0.10.2/24 and if you specify two allowed-ips in the wg create peer section it gets = worse: # ifconfig wg create =E2=80=A6=E2=80=A6. allowed-ips 10.2.3.0/24 = allowed-ips 10.11.12.0/24 # ifconfig wg0 peer-list [Peer] PublicKey =3D bmUgcaOtlEFcIoSlwPQ3qO/c14nJHYr+a7Ms/kJmOFA Endpoint =3D 192.168.4.4:8888 AllowedIPs =3D 0.0.10.11/24, 0.0.10.11/24 Otherwise this looks really nice! Next i=E2=80=99ll try some = connectivity tests. /Peter