From nobody Thu May 18 16:01:24 2023 X-Original-To: dev-commits-src-all@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 4QMZTc374Cz4BjsK; Thu, 18 May 2023 16:01:24 +0000 (UTC) (envelope-from git@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 4QMZTc2JNfz4PgJ; Thu, 18 May 2023 16:01:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684425684; 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=A5TK+NJLuVyEckKfM1IIXX1uDlap6wygrQjGWJ9sE+Y=; b=PCsd1UvFOQ5Mt9m37o02gyOw1V14/GnptizCm+ymCxnicYYY7K7dpZSn9bxM/vrURcu39C n5yEBipxNdMlSvnQ4gGtr00CKFWj1uPWA8ndPK2JzlSjW+wo6ixyUDXcKcuuF/W3wAIhka mVopJ81z70jQL2l8WYLSDYv1X0mBsvpf8BVsxcd9lasHrj6gRP5HMsr8Rg6QAE5xlw3V2H yfnos6hx5WQbfirN0w9tCJaAqhkkNN0UZh4Utn/i8HWWYY6fTS49voWFMcmhHBcchDqhUp abwNrJMCuWwRr5yNFuFcZ6LsHdWo3upynHpvZF74lQ/OvmFgtpnfI/1o0ETvQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684425684; 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=A5TK+NJLuVyEckKfM1IIXX1uDlap6wygrQjGWJ9sE+Y=; b=Wl0TIvH496VvU0fAsWbG7oAjz8rGYJNJeI8llpggEI5+1QBHNrda+TJfwMRdZDADtUb+VO nY7VFBwoBxXIlTFksBEgh86lI1ebLpy1XlU4BrNrSS+YLdVUFSNYh3kypNQYtfr7aV99UL J3qg8cQBQEEgWdEZ/p9u1TjVHkfJ9D/mUsNymJT/Hl5AG8Oax0QJTGUcDGR2CL/FNf8i1f gHgigtj7b+Vz3UFgfBwnQxGxg4CMg5ju5VCguejuTq9Ehd3NrQGENL5cmz2zYQ8d6mS7lK +gKzxV86soS5jRku0QexyXxVXCUocQpOykLQA73r95dLznnorOOHrUbyoQVdHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1684425684; a=rsa-sha256; cv=none; b=YX7zK67JiJQw+ZOujEVo3zd82xPKfQyjnbzO+n0ho+X+D5yNQdNcFL8QCxQzvfyu3MnGpS YPOdw44HdpL3u89p0ijlj+VvhNP8b28QUOcJ4ZWbJccwMCL1cRoGkGD+qK/T6w7G2c2o/L RtfZ4GUPe3JsWLR04SpuCQlD0Rtb5FWypU/e8KfLgwl4DGWh+yOk/52yGeSJZeDwRK9I4C cMkrm28xTTBilVyb1DwB3jZoWmppbc1RuF4JMklPA+kHO1U7fjSV+0JUFrvuezPuqn1a3Y rC9kKpegdridZ7eH4wF+niss0DOpwnfgV5RysR0ze+OAdz8HPUVe/dHB4El3Yw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QMZTc1LG9zsC2; Thu, 18 May 2023 16:01:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 34IG1OFh013698; Thu, 18 May 2023 16:01:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34IG1Omf013697; Thu, 18 May 2023 16:01:24 GMT (envelope-from git) Date: Thu, 18 May 2023 16:01:24 GMT Message-Id: <202305181601.34IG1Omf013697@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: c2c28c0fa2e4 - main - carp: fix unicast link-local List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c2c28c0fa2e44caf1671b4dbf94167f686c3c411 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=c2c28c0fa2e44caf1671b4dbf94167f686c3c411 commit c2c28c0fa2e44caf1671b4dbf94167f686c3c411 Author: Kristof Provost AuthorDate: 2023-05-18 15:30:39 +0000 Commit: Kristof Provost CommitDate: 2023-05-18 15:47:03 +0000 carp: fix unicast link-local If the peer6 address is a link-local address we have to embed the scopeid, much like we have to for IPv6 multicast as well. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netinet/ip_carp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 5eb6e0bf5166..935e7eaf92f5 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1065,7 +1065,8 @@ carp_send_ad_locked(struct carp_softc *sc) /* Set the multicast destination. */ memcpy(&ip6->ip6_dst, &sc->sc_carpaddr6, sizeof(ip6->ip6_dst)); - if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { + if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst) || + IN6_IS_ADDR_LINKLOCAL(&ip6->ip6_dst)) { if (in6_setscope(&ip6->ip6_dst, sc->sc_carpdev, NULL) != 0) { m_freem(m); CARP_DEBUG("%s: in6_setscope failed\n", __func__);