From nobody Thu Jun 01 00:54:10 2023 X-Original-To: net@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 4QWnhM6tcPz4XwVr for ; Thu, 1 Jun 2023 00:54:11 +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 4QWnhM5gklz4DWC for ; Thu, 1 Jun 2023 00:54:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685580851; 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=bJhz6Cwl6+bcruR+14v7FTGoltkxfI9as4dYLUrXlQg=; b=mRpb2MxtQs9w8g3/0n68xtHt9MziGHZNBJfzmfEaJp0IZMow/SRAWvvUNwaL5cfXnYhEy0 TrBC5bIkzB57a138TVwbCVWx5YNew9Jdllj6SECbqOsiH42D5w0BWLqT/lJcjvbKAc9dV/ kpG+8zCnGJmugu2/HginiwrexAdmZNlYFn3PjAYFU6jWOC4L2m+t4p5uEb0lEbFLCcvIGM FdMI6PpsIj4pfrYdmJxZ3o0wBaWcztc7lhPvZR8riWOE/uAlnkbnfglzGudESrBPxkwAO6 BSNixeKHopmwgNCAmu7WWeVnXzxi7GZi5KmMG2yWIbpjMZdCX3gyxY2gqsCT2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685580851; a=rsa-sha256; cv=none; b=SUOlxoSa+o4LVa/Y4AqFwyRvZI3JLJ/EfRCGh2wNRJw80stnUrtvBDuTdldAGTElwcZaer EI3Ev+kxRmcjh3jM4ATlkW4vI8EHn4HB3ovTQICd6nwROwGXuMo4TzaozmECcDdUM4OmPn 4WCfUMP/dZcvnuKk5F40jF/Bz7qD+hjIzqM7F9UOXdwpYKKJINijLX3YQ8Nekjjs3idPX4 nq35IWM9WfuIkPOBJORRXS5VwrinKbus/VvMHlS6ypzmkUa2PTDNLdQUHCCzTW56ueklq5 stlfzkTWYi8xD05ANUyhWkGodnY6vLaFLGd9nI1ZmK48WCbGrQ5C+TeZZqwdGA== 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 4QWnhM4l9HzxSb for ; Thu, 1 Jun 2023 00:54:11 +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 3510sBMd050529 for ; Thu, 1 Jun 2023 00:54:11 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3510sBX1050528 for net@FreeBSD.org; Thu, 1 Jun 2023 00:54:11 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: net@FreeBSD.org Subject: [Bug 270559] if_bridge: does not forward packets properly for vlan 1 Date: Thu, 01 Jun 2023 00:54:10 +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: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: ben@desync.com X-Bugzilla-Status: Closed X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: net@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: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D270559 --- Comment #15 from ben@desync.com --- (In reply to Kristof Provost from comment #14) Sure. My apologies for being overly terse. Create a bridge with IP address: # ifconfig bridge create up bridge0 # ifconfig bridge0 inet 10.0.0.1/30 Add an epair with the other end in a jail so we have something to ping: # ifconfig epair create up epair0a # ifconfig bridge0 addm epair0a # jail -ic persist vnet=3Dnew 1 # ifconfig epair0b vnet 1 # ifconfig -j 1 epair0b inet 10.0.0.2/30 up # ifconfig -j 1 epair0b | grep ether ether 02:9d:22:b7:0a:0b Start a ping and verify that the bridge learns the destination address: # ping -q 10.0.0.2 & # ifconfig bridge0 addr 02:9d:22:b7:0a:0b Vlan0 epair0a 1200 flags=3D0<> Add some other interface to the bridge: # ifconfig tap create up tap0 # ifconfig bridge0 addm tap0 # cat /dev/tap0 >/dev/null & See that unicast packets are being unexpectedly flooded to tap0 despite the bridge table entry for the destination MAC: # tcpdump -eni tap0 00:30:52.296892 58:9c:fc:00:ed:c1 > 02:9d:22:b7:0a:0b, ethertype IPv4 (0x08= 00), length 98: 10.0.0.1 > 10.0.0.2: ICMP echo request, id 1572, seq 420, length= 64 This fixes it for me: diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index d93bddf71ccb..9896c7a57191 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -2279,7 +2279,7 @@ bridge_transmit(struct ifnet *ifp, struct mbuf *m) eh =3D mtod(m, struct ether_header *); if (((m->m_flags & (M_BCAST|M_MCAST)) =3D=3D 0) && - (dst_if =3D bridge_rtlookup(sc, eh->ether_dhost, 1)) !=3D NULL)= { + (dst_if =3D bridge_rtlookup(sc, eh->ether_dhost, DOT1Q_VID_NULL= )) !=3D NULL) { error =3D bridge_enqueue(sc, dst_if, m); } else bridge_broadcast(sc, ifp, m, 0); Thank you! --=20 You are receiving this mail because: You are the assignee for the bug.=