From nobody Mon Sep 09 13:39:55 2024 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 4X2Scq4PrGz5WQn7 for ; Mon, 09 Sep 2024 13:39:55 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X2Scq2ShJz4NSD for ; Mon, 9 Sep 2024 13:39:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725889195; a=rsa-sha256; cv=none; b=ynk9ANLqbCnfO8S21z1zjxJVwErkZhyM7PQBvmC5Rr2aIJDANIGeLGFAHLfjfctgAFYxIR gf3bRMTLS9DvWvlhZSa0SRutXMtWTslm/4m7tZu7CvLn+azxpDf/lNSsmlAgSdebU3p5Tv N1hEmJy2QgrFKYOgTPHLZKbWnPYSBtCiRfWEJZlUp6uimuffauKffIeRo4Axd6SFTEmjwx yvDYSqjUBEPv6flI9doSdkQboYedH9riyvbNQyhr0r5NheFzS6vpdZ32AviVg44aNLWy+B So4WCy/sS7NnhcjdPGNZEZBtDKw8HTx39z+QtX/LtdZ25T71Etd6OElhI7x/iQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725889195; 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=Q5OLE66JJIQfxwELXZbIvFA+jpILXfOqDUHee3CFC8I=; b=AEO2YYNfVZKJQgwMrQCzFwtfAhF7MMDVZEdFEMawtIGIyMflxsrJ5CZxCzl6MvowvhnRNc fbhfmlarbgg7ApyfOo5n46csqZhsEU7g01SCvejGPyX8aNRKBdl/5QD2CptswdPNe+DE0o KaJ+stE0RnxWrGOZyFOi6WHuLhh/FvWLjtT7nwSp7oJQ9UImuGdMBwZFOsALWfbFaRnISl JGFlviOhJcU3A4yddgQWQ4+SMeON7A2C2BqrCr4ph/FgaZqfDE5xdhkzPOO9VLtM6QXFO8 mXffRbnPanXHcAcg/fExvBcGgjeZNOkviiuRb50EnLq2+8nmqk1kI/JfWHJ4rQ== 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 4X2Scq1Jw9z14s9 for ; Mon, 9 Sep 2024 13:39:55 +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 489Ddt5B001261 for ; Mon, 9 Sep 2024 13:39:55 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 489DdthD001254 for bugs@FreeBSD.org; Mon, 9 Sep 2024 13:39:55 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 281391] IPv6 multicast sent to wrong MAC address Date: Mon, 09 Sep 2024 13:39:55 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 14.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: cmfitch1@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter 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: 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 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D281391 Bug ID: 281391 Summary: IPv6 multicast sent to wrong MAC address Product: Base System Version: 14.0-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: cmfitch1@gmail.com An application that joins an IPv6 multicast group without performing an IPV6_MULTICAST_IF setsockopt() will see packets sent to the wrong MAC addre= ss. According to RFC2464 section 7 [1], the MAC should be 33:33:DST[13]:DST[14]:DST[15]:DST[16], but FreeBSD is sending to 33:33:last:four:of:gateway. Setting IPV6_MULTICAST_IF results in the expect= ed destination MAC. My uneducated analysis - It looks to me like this is because setting IPV6_MULTICAST_IF bypasses (sys/netinet6/ip6_output.c:753) the routing code that would otherwise modify the destination IP to be the gateway. I expect what's missing is the equivalent of sys/netinet/ip_output.c:551 where the destination is restored to be the multicast address after the routing decis= ion is made: /* * IP destination address is multicast. Make sure "gw" * still points to the address in "ro". (It may have been * changed to point to a gateway address, above.) */ gw =3D (const struct sockaddr *)dst; [1] https://datatracker.ietf.org/doc/html/rfc2464#section-7 --=20 You are receiving this mail because: You are the assignee for the bug.=