aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Benc <jbenc@redhat.com>2013-10-04 11:04:48 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-11-04 07:31:01 -0500
commitb15e22da6eb11f54ef53bec9b9e9adbc4fba1609 (patch)
treec405875599ed99b876a53ce940d450b4769d28eb
parentdf6ae0dc3145f5d3c0b04a59e64cd647469881e4 (diff)
ipv4: fix ineffective source address selection
[ Upstream commit 0a7e22609067ff524fc7bbd45c6951dd08561667 ] When sending out multicast messages, the source address in inet->mc_addr is ignored and rewritten by an autoselected one. This is caused by a typo in commit 813b3b5db831 ("ipv4: Use caller's on-stack flowi as-is in output route lookups"). Signed-off-by: Jiri Benc <jbenc@redhat.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--net/ipv4/route.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index d35bbf0cf404..d11e73ce9365 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2020,7 +2020,7 @@ struct rtable *__ip_route_output_key(struct net *net, struct flowi4 *fl4)
2020 RT_SCOPE_LINK); 2020 RT_SCOPE_LINK);
2021 goto make_route; 2021 goto make_route;
2022 } 2022 }
2023 if (fl4->saddr) { 2023 if (!fl4->saddr) {
2024 if (ipv4_is_multicast(fl4->daddr)) 2024 if (ipv4_is_multicast(fl4->daddr))
2025 fl4->saddr = inet_select_addr(dev_out, 0, 2025 fl4->saddr = inet_select_addr(dev_out, 0,
2026 fl4->flowi4_scope); 2026 fl4->flowi4_scope);