Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2249017ybd; Mon, 24 Jun 2019 03:16:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqyghs739vCBwa7OL8vIi7jkaXvQ6Tc++G99+Js2SiwFynAEQbjGExYEFlQKRIKHteKi8FtU X-Received: by 2002:a63:c20e:: with SMTP id b14mr31059814pgd.96.1561371414464; Mon, 24 Jun 2019 03:16:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561371414; cv=none; d=google.com; s=arc-20160816; b=DMO7zcJkimVoUskPPbi3TSrwpw93alF4vZ+ccIxE9SwShK8ogEg2IWnsWQfSuHdJNV n8DlgJ8pff2jIILUf41lNxoM5D4Ugulkzn5psbZmhQroCZtgT6ratk8uTb1vREbQN2gS pYx4GGryOE3Zqifd6Q74PzaMNYRvrZA8nygKo9V3BRvv9VxjQbGYcT/OHBd0uSZm80+O ncO+MqVLjUWxfmSzmphtvnIz69r6KVD4oBdcF9aN9coSxqgNZhVy6MYE/42PtAcPypux eJgMiqmwGKy5hIzMcSwjPE9Zf4aJUXZ3RHsvMK15Pmk9PF0S4EqOtPpqt9oxP7Tw/14j M/FA== 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=c8jBeAPl0GcMBvg0cBYsOfqCASvjeNxK91HWMNl+1bI=; b=xGm7XHp2bftYMWAJD0R+PDrdhBSyQAUcKcaCOsoi9YlbiDlqHefnNAbZuhipQYJPB3 bndCNWhqn6Z4DtgPbGcQkQrP4f1wdacoItddKE2sjhrsEiebmB+z7k1bVx4kDXlOZFJB a4Ex5fk7dUuQJUSf1SdE+2hZI4bMiP6ERs1GJFzNdQocqm/674uJYokdWrXTUgv5SHoG Ng9ujY7aqkMsUa8oArPlrEPt7hdJ0xN1Qkzws8s3judDIiza8Zvll6xYOOfq4vD+79+X T9kOI0MqrfD4z1j6m67ZK8Ft3El+RB8hTj6vLeQNPHtcaU1SXPL7Un/gVRTkTjmxrwp5 o3jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KUpoiYiA; 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 w7si10552475pjr.65.2019.06.24.03.16.38; Mon, 24 Jun 2019 03:16:54 -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=KUpoiYiA; 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 S1730178AbfFXKQV (ORCPT + 99 others); Mon, 24 Jun 2019 06:16:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:53810 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730716AbfFXKQT (ORCPT ); Mon, 24 Jun 2019 06:16:19 -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 D6FE2205ED; Mon, 24 Jun 2019 10:16:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561371379; bh=ItG58oxo55y7vmAp93rhq5C1zB1HpbpQeHMneZJ8HRs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KUpoiYiAhNlo8FjLoNJZA3kycTbkwJJFs2jpNbOWc4aAE/9dZHf3XszU07QFAlUl+ kmZg5zg9iYnoxwYujFh2x3np7XVjZFcWFwLfw3qJ95elJDvCHpPT3OXwpRw63Q7me/ 2el5ezBZVDQ+JgDNjTamzyyBQIJHLciEz/MhSWoQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Julian Wiedmann , "David S. Miller" , Sasha Levin Subject: [PATCH 5.1 082/121] s390/qeth: handle limited IPv4 broadcast in L3 TX path Date: Mon, 24 Jun 2019 17:56:54 +0800 Message-Id: <20190624092325.041131363@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190624092320.652599624@linuxfoundation.org> References: <20190624092320.652599624@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 72c87976c5abbf8a834ad85f10d03c0cd58b985c ] When selecting the cast type of a neighbourless IPv4 skb (eg. on a raw socket), qeth_l3 falls back to the packet's destination IP address. For this case we should classify traffic sent to 255.255.255.255 as broadcast. This fixes DHCP requests, which were misclassified as unicast (and for IQD interfaces thus ended up on the wrong HW queue). Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/s390/net/qeth_l3_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index 53712cf26406..cb641fd303d3 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c @@ -1906,6 +1906,8 @@ static int qeth_l3_get_cast_type(struct sk_buff *skb) /* no neighbour (eg AF_PACKET), fall back to target's IP address ... */ switch (qeth_get_ip_version(skb)) { case 4: + if (ipv4_is_lbcast(ip_hdr(skb)->daddr)) + return RTN_BROADCAST; return ipv4_is_multicast(ip_hdr(skb)->daddr) ? RTN_MULTICAST : RTN_UNICAST; case 6: -- 2.20.1