From nobody Sun Apr 2 15:44:29 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 4PqJHK2f1Nz43nyY for ; Sun, 2 Apr 2023 15:44:29 +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 4PqJHK16jnz3sjW for ; Sun, 2 Apr 2023 15:44:29 +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=1680450269; 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=fucIYmLMROT/upNpK+AE25NDBNaKiFlyGzrjdawKFj4=; b=OTBH7urZAfr1J2MV2OI0wswK6VkKDr0z0kLREA9kbtbIn0oboBhhezGvoljr/fVsgkb+5c lMCyVH+YGvvdCMGKwc82Q33P7HYnOErGMKhRQBBIc8ForWj+pC3YMoVC4ZzehoPbOy1+u3 9HSikBsf/ohMpKHHnsztNhTnT+uB/zokmLwFz0J4uHDvg7Bf1vXzwtiumLCtYs6RtbTdj/ QD9emmUL1qFJFUWzHXLTp5bInMr0EfS1tV1GSei7kBFx6pFCEkXTtQ+jvWx6HfAWBD/Ezh lOISjuToS+tkoLRFu75wOH+CHshnT9edWnaXuyPbk5B280uJEj/WsEXimNEVPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1680450269; a=rsa-sha256; cv=none; b=paJvWS6FKMzZNo/nr+EJJqKxQ5UkvuKIt4uyXQcJhnGNuNvIJCK83Yu7/9jc3BhVq21Uql 1G/JrZf/qKll0TsvhuOGF3mJRDk4xUIF9QSXjcmX9Fz3FjQu9CB2ZdF9dwRHH6nI+D0eGB nVVADjzJxojiGyYNeUScyymDqE1weVbeBVlLBK2fT+ghfjpDeSKRYkzD1ps5PpgaRKlj+K S/vBrECjrVYxeh6aSDlDRMHK/nC9ZjZed5YKhoYLvLkKp5nKZz7UaiJgu5moDDRBSfxcmU dN7vHLRYqYFl8km04eBKWPSZFbyQ7rLSI1WnuE2pFboPYNNqKdYI0Te7sCSpYg== 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 4PqJHK0BLvzNJP for ; Sun, 2 Apr 2023 15:44:29 +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 332FiScX066450 for ; Sun, 2 Apr 2023 15:44:28 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 332FiS7V066449 for net@FreeBSD.org; Sun, 2 Apr 2023 15:44:28 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: Sun, 02 Apr 2023 15:44:29 +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: zlei@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: 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 #5 from Zhenlei Huang --- (In reply to Kristof Provost from comment #4) > I'd expect this to work, because the bridge code does take vlan ID into a= ccount > when it learns addresses. After looked into the code, I think the root cause is that if_bridge(4) tre= at untagged packets as from vlan 1 (the default VID for bridge as 802.1Q-2003 Table 9-2), and untagged packets and that from vlan 1 share the same forwar= ding lookup table. if_bridge(4) will then treat the two host from different broadcast domain as the same one. One possible solution could be treat untagged packets as untagged (or vlan = 0) and tagged as tagged. Although vlan 0 is not valid as per 802.1Q-2003 but it has no side effect if user treat if_bridge(4) as transparent bridge. Actual= ly if_bridge(4) does not function as a full 802.1q aware bridge (I mean it mis= ses policies such as adding tags for inbound and removing tags on outbound or dropping packets with unknown / un-configured tags). > I translated your test into an automated test: https://reviews.freebsd.or= g/D39379 , > but that seems to pass. Did I miss something? I'll comment directly on D39379. --=20 You are receiving this mail because: You are the assignee for the bug.=