]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.10.18/ipv4-fix-ineffective-source-address-selection.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.10.18 / ipv4-fix-ineffective-source-address-selection.patch
CommitLineData
7f7c74eb
GKH
1From 1f5ac4303b598cfd40fa73284ed59c5ac7cc3cc1 Mon Sep 17 00:00:00 2001
2From: Jiri Benc <jbenc@redhat.com>
3Date: Fri, 4 Oct 2013 17:04:48 +0200
4Subject: ipv4: fix ineffective source address selection
5
6From: Jiri Benc <jbenc@redhat.com>
7
8[ Upstream commit 0a7e22609067ff524fc7bbd45c6951dd08561667 ]
9
10When sending out multicast messages, the source address in inet->mc_addr is
11ignored and rewritten by an autoselected one. This is caused by a typo in
12commit 813b3b5db831 ("ipv4: Use caller's on-stack flowi as-is in output
13route lookups").
14
15Signed-off-by: Jiri Benc <jbenc@redhat.com>
16Acked-by: Eric Dumazet <edumazet@google.com>
17Signed-off-by: David S. Miller <davem@davemloft.net>
18Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19---
20 net/ipv4/route.c | 2 +-
21 1 file changed, 1 insertion(+), 1 deletion(-)
22
23--- a/net/ipv4/route.c
24+++ b/net/ipv4/route.c
25@@ -2020,7 +2020,7 @@ struct rtable *__ip_route_output_key(str
26 RT_SCOPE_LINK);
27 goto make_route;
28 }
29- if (fl4->saddr) {
30+ if (!fl4->saddr) {
31 if (ipv4_is_multicast(fl4->daddr))
32 fl4->saddr = inet_select_addr(dev_out, 0,
33 fl4->flowi4_scope);