From nobody Mon Sep 26 09:55:43 2022 X-Original-To: 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 4MbdRg6bzWz4dZS1 for ; Mon, 26 Sep 2022 09:55:43 +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 4MbdRg5XNxz3XKh for ; Mon, 26 Sep 2022 09:55:43 +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 4MbdRg4VQDzk9X for ; Mon, 26 Sep 2022 09:55:43 +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 28Q9thSl079985 for ; Mon, 26 Sep 2022 09:55:43 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 28Q9thFj079984 for bugs@FreeBSD.org; Mon, 26 Sep 2022 09:55:43 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: bugs@FreeBSD.org Subject: [Bug 266598] if_ovpn(4) DCO module not supporting correctly IPv6 Traffic Class for tunneled packets Date: Mon, 26 Sep 2022 09:55:43 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: ipv6 X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: kp@freebsd.org X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664186143; 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: in-reply-to:in-reply-to:references:references; bh=Difa+Uw0cFmEGwZuxJScd/+xHJYr94WzDFTy5gFXJiI=; b=grFY3gNa87KhoNR2Zrg+OemPb88JmfvVsHPFS1bxQA03pX6gOOgAIZez7H8D43ulIif40l 3VZgAy+cXycqhmgg14IM5HvjmXMB8kMENPLeT00X3cRNkcwaziwmv0aFdN8+OY+ZJdUdh0 mNVxfYyZ+MyvVC7sU2XP4g/2eZ533AbW+hwQ7Vx2M0F5dBTCzoSuwmADtIYS0T7i9Dhh5t wW7zp3arCvDgDA/GQNjE0yBruabHOAI9mxFs/09blubIFxH9fjTXW7/wFFG/Lt12pBkj+P fYfI9eW+TL3xHIVaczNt0NrvEuaMWdzayCpcpElxTPtE/kLNfdsZhl3QDUl+TA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664186143; a=rsa-sha256; cv=none; b=G05e++Rd03HGXnGEr31SqeKOEJzHIL8fxepwBQG1ol1ynKuMm4MgQgqI6BPF4WRj/aVXOk YUBO5G+IV4K081X3W2+IWzWcwK+q/bfh46As+mQSMx81SMXMnX6elZ+/CdkfCoEmuRFIqK JAMQL+aLaro5mBDM7BGK1D4jZCvkgCBSTE8gydTZZk8POXq1q28LbMaigVcT//3Qhwt7AY h2Uy96rPUEoQLIGY4zl5Uqgu01cli3Oona7a1Og/kvQR6vG/PL+WXiC4XO3zQSJ5WcBxiK X1NkBQOCq2QiptCjsJEP08fR/3tb0W6H10tjkH8+NPtX5UeVDWjT+QaDShdBOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D266598 --- Comment #11 from Kristof Provost --- (In reply to Kristof Provost from comment #10) I suspect I found it: diff --git a/sys/net/if_ovpn.c b/sys/net/if_ovpn.c index 286125fb42d5..0577fcee8618 100644 --- a/sys/net/if_ovpn.c +++ b/sys/net/if_ovpn.c @@ -1572,7 +1581,7 @@ ovpn_get_af(struct mbuf *m) return (AF_INET); ip6 =3D mtod(m, struct ip6_hdr *); - if (ip6->ip6_vfc =3D=3D IPV6_VERSION) + if ((ip6->ip6_vfc & IPV6_VERSION_MASK) =3D=3D IPV6_VERSION) return (AF_INET6); return (0); The check for 'what IP version is this packet?' didn't account for the ToS field sharing bits with the IP version field. We didn't see the outgoing pa= cket in tcpdump, because the BPF capture point (for outbound traffic) is conditi= onal on the address family (in part to avoid capturing control packets, in part because the capture point needs to know). On the receive side the packet gets decrypted, but not passed to the IP sta= ck, because we don't know where to send it (i.e. v4 or v6). Small fix for a bigger issue. I'll also extend the FreeBSD if_ovpn tests to include packets with the ToS = bits set. --=20 You are receiving this mail because: You are the assignee for the bug.=