From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Fw: [Bug 198297] New: Unable to add ethX to bridge if ethX. is already present in this bridge Date: Thu, 28 Dec 2017 09:08:14 -0800 Message-ID: <20171228090814.2e425bb3@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable To: netdev@vger.kernel.org Return-path: Received: from mail-pg0-f42.google.com ([74.125.83.42]:44397 "EHLO mail-pg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751091AbdL1RIX (ORCPT ); Thu, 28 Dec 2017 12:08:23 -0500 Received: by mail-pg0-f42.google.com with SMTP id i5so4089781pgq.11 for ; Thu, 28 Dec 2017 09:08:23 -0800 (PST) Received: from xeon-e3 (204-195-18-133.wavecable.com. [204.195.18.133]) by smtp.gmail.com with ESMTPSA id t75sm73296807pfi.146.2017.12.28.09.08.22 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Dec 2017 09:08:23 -0800 (PST) Sender: netdev-owner@vger.kernel.org List-ID: I don't think this is ever going to work as expected. Begin forwarded message: Date: Thu, 28 Dec 2017 08:38:37 +0000 From: bugzilla-daemon@bugzilla.kernel.org To: stephen@networkplumber.org Subject: [Bug 198297] New: Unable to add ethX to bridge if ethX. i= s already present in this bridge https://bugzilla.kernel.org/show_bug.cgi?id=3D198297 Bug ID: 198297 Summary: Unable to add ethX to bridge if ethX. is already present in this bridge Product: Networking Version: 2.5 Kernel Version: 4.14.2 Hardware: ARM OS: Linux Tree: Mainline Status: NEW Severity: normal Priority: P1 Component: Other Assignee: stephen@networkplumber.org Reporter: alexander_cheremshinsky@yahoo.com Regression: No Kernel fails adding ethX to bridge if ethX. is already present in = this bridge. Steps to reproduce: # vconfig add eth2 10 # brctl addbr br # brctl addif br eth2.10 # brctl show bridge name bridge id STP enabled interfaces br 8000.0024a407481a no eth2.10 # brctl addif br eth2 can't add eth2 to bridge br: File exists # brctl show bridge name bridge id STP enabled interfaces br 8000.0024a407481a no eth2.10 But it is ok if ethX is added before ethX. Steps to reproduce: # brctl delif br eth2.10 # brctl addif br eth2 # brctl addif br eth2.10 # brctl show bridge name bridge id STP enabled interfaces br 8000.0024a407481a no eth2 eth2.10 So the result is depending on order of interface addition, that does not lo= oks logical as for me. This works good at least in kernel 3.10.70. =46rom my investigation it fails in function __netdev_upper_dev_link (net/core/dev.c) on lines: if (netdev_has_upper_dev(dev, upper_dev)) return -EEXIST; I checked source code of kernel 4.14.8 but it looks the same and I think it also has this issue. I'm not so good with linux kernel to fix this by myself so it would be very nice to get a patch with fix for this issue or explanation why such behavio= r is correct. Thanks in advance, Alex. --=20 You are receiving this mail because: You are the assignee for the bug.