Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 82476b31 authored by Veaceslav Falico's avatar Veaceslav Falico Committed by David S. Miller
Browse files

net: correctly interlink lower/upper devices



Currently we're linking upper devices to lower ones, which results in
upside-down relationship: upper devices seeing lower devices via its upper
lists.

Fix this by correctly linking lower devices to the upper ones.

CC: "David S. Miller" <davem@davemloft.net>
CC: Eric Dumazet <edumazet@google.com>
CC: Jiri Pirko <jiri@resnulli.us>
CC: Alexander Duyck <alexander.h.duyck@intel.com>
CC: Cong Wang <amwang@redhat.com>
Signed-off-by: default avatarVeaceslav Falico <vfalico@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ea23192e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -4679,8 +4679,8 @@ static int __netdev_upper_dev_link(struct net_device *dev,
	 * versa, and don't forget the devices itself. All of these
	 * links are non-neighbours.
	 */
	list_for_each_entry(i, &upper_dev->upper_dev_list, list) {
		list_for_each_entry(j, &dev->lower_dev_list, list) {
	list_for_each_entry(i, &dev->lower_dev_list, list) {
		list_for_each_entry(j, &upper_dev->upper_dev_list, list) {
			ret = __netdev_adjacent_dev_link(i->dev, j->dev);
			if (ret)
				goto rollback_mesh;