diff options
author | Jiri Benc <jbenc@redhat.com> | 2013-10-04 17:04:48 +0200 |
---|---|---|
committer | Kamal Mostafa <kamal@canonical.com> | 2013-11-01 13:26:24 -0700 |
commit | 8bf2f23fd55cb7a83817a97f7678a0a0e6804c35 (patch) | |
tree | 90325a9c4346821281a421dc74c54f801874a555 /net | |
parent | 924ff65c3b39f902bd183577008073c0e8055ae7 (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: Kamal Mostafa <kamal@canonical.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/route.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 70da49448f8f..0bf88e431460 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -2024,7 +2024,7 @@ struct rtable *__ip_route_output_key(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); |