aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Benc <jbenc@redhat.com>2013-10-04 17:04:48 +0200
committerLuis Henriques <luis.henriques@canonical.com>2013-10-25 10:41:42 +0100
commit361d55e7eed28ffc22ab0f91382ee4f5969749f4 (patch)
treece20f54ea0fc3f2821010e3666a52e4f61459e78
parentb14b994366a3dac8276dd184dbd8affe80c1f7d5 (diff)
ipv4: fix ineffective source address selection
commit 0a7e22609067ff524fc7bbd45c6951dd08561667 upstream. 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: Luis Henriques <luis.henriques@canonical.com>
-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 98b30d08efe9..87074172df5e 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2707,7 +2707,7 @@ static struct rtable *ip_route_output_slow(struct net *net, struct flowi4 *fl4)
RT_SCOPE_LINK);
goto make_route;
}
- if (fl4->saddr) {
+ if (!fl4->saddr) {
if (ipv4_is_multicast(fl4->daddr))
fl4->saddr = inet_select_addr(dev_out, 0,
fl4->flowi4_scope);