]>
Commit | Line | Data |
---|---|---|
7f7c74eb GKH |
1 | From 1f5ac4303b598cfd40fa73284ed59c5ac7cc3cc1 Mon Sep 17 00:00:00 2001 |
2 | From: Jiri Benc <jbenc@redhat.com> | |
3 | Date: Fri, 4 Oct 2013 17:04:48 +0200 | |
4 | Subject: ipv4: fix ineffective source address selection | |
5 | ||
6 | From: Jiri Benc <jbenc@redhat.com> | |
7 | ||
8 | [ Upstream commit 0a7e22609067ff524fc7bbd45c6951dd08561667 ] | |
9 | ||
10 | When sending out multicast messages, the source address in inet->mc_addr is | |
11 | ignored and rewritten by an autoselected one. This is caused by a typo in | |
12 | commit 813b3b5db831 ("ipv4: Use caller's on-stack flowi as-is in output | |
13 | route lookups"). | |
14 | ||
15 | Signed-off-by: Jiri Benc <jbenc@redhat.com> | |
16 | Acked-by: Eric Dumazet <edumazet@google.com> | |
17 | Signed-off-by: David S. Miller <davem@davemloft.net> | |
18 | Signed-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); |