From nobody Fri Sep 30 02:07:40 2022 X-Original-To: ports-bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Mdtsn1b7rz4dfPF for ; Fri, 30 Sep 2022 02:07:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Mdtsn0T32z3jyZ for ; Fri, 30 Sep 2022 02:07:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Mdtsm6TF2z11c6 for ; Fri, 30 Sep 2022 02:07:40 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 28U27eFP026600 for ; Fri, 30 Sep 2022 02:07:40 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 28U27eNS026599 for ports-bugs@FreeBSD.org; Fri, 30 Sep 2022 02:07:40 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 266712] net/wireguard-kmod: Misleading error message when if_wg is not properly configured Date: Fri, 30 Sep 2022 02:07:40 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: zlei.huang@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: decke@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664503661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=71qv8DLT+pKCGvd3rGVqFYkRTkpH7b+HduvwEuq7jqw=; b=FSjs/r6aJ05k7RM/TJaCiPfCQ8Np1MgMrVHV2rDl/DPT0lgoLXnaR3C7eumHVwjJUSN4aW KJbop4LVFp4S0nquDhMtRjpVxoANXH0O+fPlhs+ftkKCLpru5iE0+bcipG7vA9MdFMU0Yj R1dfmq0+GBnDNxVTQnFWV29f2LnC2nNWBx50hWBybrqaljxnXOQgfJGJRE8TqEyutCZy5r Kd6p19GvqFBau/jmkldK8eSdpEHJIb7akWetSfYgxFZFTAe9EszawpQLoFHIrKqzaC61gR fQViK4otjhIKNYUfwVr1+RYMPhr812bNVXe2vru1yVm6xXBoEoOJxmg1dzpxSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664503661; a=rsa-sha256; cv=none; b=o6yLA6WkHyPcPCy+A4n0TQa6XL0Bye3+SBueCjMiSvSCv4PJpf/NTo8LdltvxzivwLPqzZ LPV/eGdNTyiM/B5QT2ciagIAFVqN9ee/BKJAkkLLoOuCdZlYBcd5BKt9tqK/dAbSTn11O0 y9vtJzpWGcJXvHnS3ySj14Cc8Pdhb/XyYZazpp2Tm4EKVyTy0RoyRwbeSSDpq28EaWuPE8 u93QTdGthLYpdaFvBOBD+wC3MFsWExAeaCPzEqLqdkjjykgRxKyAP8FTMwf9Ly57q+AyAF wrOWIFq2kRrdvqZNKHlvPzuKIS9Vk+5yPnmGYyOBTckWldfQnTJkezYCTWZ8aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D266712 Bug ID: 266712 Summary: net/wireguard-kmod: Misleading error message when if_wg is not properly configured Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: decke@FreeBSD.org Reporter: zlei.huang@gmail.com Flags: maintainer-feedback?(decke@FreeBSD.org) Assignee: decke@FreeBSD.org I'm new to wireguard. While trying to repeat https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D261711 I have ever made= a mistake and the wireguard interface did not come up properly but there was = no good prompt about that. Environment: FreeBSD 13.1, wireguard-kmod-0.0.20220615, wireguard-tools-1.0.20210914_1 The content of wg1.conf ``` [Interface] PrivateKey =3D +Gu/JLpCpS5kG7tfHE1FYizocef+HlsebE/5djg+XUU=3D Address =3D 192.168.100.1/24 ListenPort =3D 51820 [Peer] PublicKey =3D ADTJlJuuTjUaAkPchD4Fk6nOiH1Kw3vqqzBiaKHScHE=3D AllowedIPs =3D 0.0.0.0/0 Endpoint =3D 192.168.117.155:51820 PersistentKeepalive =3D 15 ``` Be aware the peer's public key is same with the interface. I was trying to reuse the same pair of private key and public key for different wireguard b= ox. ``` root@:~ # echo "+Gu/JLpCpS5kG7tfHE1FYizocef+HlsebE/5djg+XUU=3D" | wg pubkey ADTJlJuuTjUaAkPchD4Fk6nOiH1Kw3vqqzBiaKHScHE=3D ``` Steps to repeat: ``` root@:~ # wg-quick up ./wg1.conf [#] ifconfig wg create name wg1 [#] wg setconf wg1 /dev/stdin [#] ifconfig wg1 inet 192.168.100.1/24 alias [#] ifconfig wg1 mtu 1420 [#] ifconfig wg1 up [+] Backgrounding route monitor root@:~ # wg show wg1 interface: wg1 public key: ADTJlJuuTjUaAkPchD4Fk6nOiH1Kw3vqqzBiaKHScHE=3D private key: (hidden) listening port: 51820 root@:~ # ping -t 1 -c 1 192.168.100.2 PING 192.168.100.2 (192.168.100.2): 56 data bytes ping: sendto: Capabilities insufficient 92 bytes from 127.0.0.1: Destination Host Unreachable Vr HL TOS Len ID Flg off TTL Pro cks Src Dst 4 5 00 0054 ada5 0 0000 40 01 83af 192.168.100.1 192.168.100.2=20 --- 192.168.100.2 ping statistics --- 1 packets transmitted, 0 packets received, 100.0% packet loss ``` The error message "Capabilities insufficient" is misleading. --=20 You are receiving this mail because: You are the assignee for the bug.=