From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:40164 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1166321AbdD2G0W (ORCPT ); Sat, 29 Apr 2017 02:26:22 -0400 Subject: Patch "net: ipv4: fix multipath RTM_GETROUTE behavior when iif is given" has been added to the 4.9-stable tree To: fl@n621.de, davem@davemloft.net, gregkh@linuxfoundation.org Cc: , From: Date: Sat, 29 Apr 2017 08:24:04 +0200 Message-ID: <1493447044129230@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled net: ipv4: fix multipath RTM_GETROUTE behavior when iif is given to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: net-ipv4-fix-multipath-rtm_getroute-behavior-when-iif-is-given.patch and it can be found in the queue-4.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From foo@baz Sat Apr 29 08:22:13 CEST 2017 From: Florian Larysch Date: Mon, 3 Apr 2017 16:46:09 +0200 Subject: net: ipv4: fix multipath RTM_GETROUTE behavior when iif is given From: Florian Larysch [ Upstream commit a8801799c6975601fd58ae62f48964caec2eb83f ] inet_rtm_getroute synthesizes a skeletal ICMP skb, which is passed to ip_route_input when iif is given. If a multipath route is present for the designated destination, ip_multipath_icmp_hash ends up being called, which uses the source/destination addresses within the skb to calculate a hash. However, those are not set in the synthetic skb, causing it to return an arbitrary and incorrect result. Instead, use UDP, which gets no such special treatment. Signed-off-by: Florian Larysch Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/ipv4/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -2569,7 +2569,7 @@ static int inet_rtm_getroute(struct sk_b skb_reset_network_header(skb); /* Bugfix: need to give ip_route_input enough of an IP header to not gag. */ - ip_hdr(skb)->protocol = IPPROTO_ICMP; + ip_hdr(skb)->protocol = IPPROTO_UDP; skb_reserve(skb, MAX_HEADER + sizeof(struct iphdr)); src = tb[RTA_SRC] ? nla_get_in_addr(tb[RTA_SRC]) : 0; Patches currently in stable-queue which might be from fl@n621.de are queue-4.9/net-ipv4-fix-multipath-rtm_getroute-behavior-when-iif-is-given.patch