Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2246055ybd; Mon, 24 Jun 2019 03:13:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4OW/YmHO/xqR4Znq12LtZo3i2E8WAzY77QFqnx4xyiYCwJW8Ewo418VZ8/YgTUCOTKzyl X-Received: by 2002:a63:8d4a:: with SMTP id z71mr21547591pgd.346.1561371236501; Mon, 24 Jun 2019 03:13:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561371236; cv=none; d=google.com; s=arc-20160816; b=Z6TZMVqMkbHAmMX1kCyoBuqYuZ29sjylBiK1Q0xJVVGnqmdLfBOkbjE9RxlUZAQ52N Fpo4JW0eSlkSgPcDoYH9bcMrp07eRh+Qg/jIqs0np34Lmst2Plj6ioKbXttBQkZ3vmXE JYozw3Qkxdx0QHJq/31uARW9imLDmr4Vix+0qVDjr9bi/6ZRetqQZXp7XPXisCkpo4QD IguOPgKfCdj7B/uNiJXakXoqBKl9ainVi2un5wsKxTz4YrlQvadnNVUyjgCfFf8yMm+u rM+Ftro/U9bYs4uYH4QWH6rxto8hWvt2yqY+T0vq/7CejWE7w4KCEtJKyHwM+i9iv6P4 vu3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BR0P8irhKA6lttR4EPf1dXDg24mw+vjz/QJOD4qBlfg=; b=aBuKYub5nml8ckF5NWq2/pPavynKG66SsppDpiiB/Ea0wgCyHtyiJhs0OKdwgfDScT qLZskvHc2N6iBhmlGecLlwY7YBJI3WRIuKzdM5htiGMGkvri9QqthAekCwxYGwZ+bL21 MslRYc92+2yWO0l7FAxTJyzizrI+o+IbTcolZkv4owPd1PGE4jXqjyTjHUFuO08f814B nHjBgQbFnzBANFKybyF07GKlPG5FDJxdIKBHH+84Cru2a2z43/LxpAX4nzVnI//EaIps IbRFoq619nzJL+Sf5kouBabNGRGS4oDUV3K/zKdiooA82rHvNeACTSgTbj20B0sErbb5 SeZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EcT2xNZd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h19si1822965pgm.379.2019.06.24.03.13.40; Mon, 24 Jun 2019 03:13:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EcT2xNZd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729543AbfFXKFT (ORCPT + 99 others); Mon, 24 Jun 2019 06:05:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:37030 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729868AbfFXKFJ (ORCPT ); Mon, 24 Jun 2019 06:05:09 -0400 Received: from localhost (f4.8f.5177.ip4.static.sl-reverse.com [119.81.143.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6A510208E4; Mon, 24 Jun 2019 10:05:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561370708; bh=LECFxNB46gjBVL6+E+0jIRsIP3HmNmng9kE5QR3aL+o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EcT2xNZd9bCpSMwTBMv6fFutqU59hRfAN3Iulq6+/v2x0iaIBOOqQengX4308jiAV BIa6LUSEmiOpgLSv8w/VWU4ytx+DFzrJcqxVJSTBHtmxxUzRGB8n/ALGEejCzBOrOK ldCB+y7m5WkJPJbDkyFDrSpr482be5HBVROShZj8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexandra Winter , Julian Wiedmann , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 63/90] s390/qeth: fix VLAN attribute in bridge_hostnotify udev event Date: Mon, 24 Jun 2019 17:56:53 +0800 Message-Id: <20190624092318.234478693@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190624092313.788773607@linuxfoundation.org> References: <20190624092313.788773607@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 335726195e460cb6b3f795b695bfd31f0ea70ef0 ] Enabling sysfs attribute bridge_hostnotify triggers a series of udev events for the MAC addresses of all currently connected peers. In case no VLAN is set for a peer, the device reports the corresponding MAC addresses with VLAN ID 4096. This currently results in attribute VLAN=4096 for all non-VLAN interfaces in the initial series of events after host-notify is enabled. Instead, no VLAN attribute should be reported in the udev event for non-VLAN interfaces. Only the initial events face this issue. For dynamic changes that are reported later, the device uses a validity flag. This also changes the code so that it now sets the VLAN attribute for MAC addresses with VID 0. On Linux, no qeth interface will ever be registered with VID 0: Linux kernel registers VID 0 on all network interfaces initially, but qeth will drop .ndo_vlan_rx_add_vid for VID 0. Peers with other OSs could register MACs with VID 0. Fixes: 9f48b9db9a22 ("qeth: bridgeport support - address notifications") Signed-off-by: Alexandra Winter Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/s390/net/qeth_l2_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index b7513c5848cf..c1c35eccd5b6 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c @@ -1901,7 +1901,7 @@ static void qeth_bridgeport_an_set_cb(void *priv, l2entry = (struct qdio_brinfo_entry_l2 *)entry; code = IPA_ADDR_CHANGE_CODE_MACADDR; - if (l2entry->addr_lnid.lnid) + if (l2entry->addr_lnid.lnid < VLAN_N_VID) code |= IPA_ADDR_CHANGE_CODE_VLANID; qeth_bridge_emit_host_event(card, anev_reg_unreg, code, (struct net_if_token *)&l2entry->nit, -- 2.20.1