Skip to content

Commit

Permalink
route: Take the right src and dst addresses in ip_route_newports
Browse files Browse the repository at this point in the history
When we set up the flow informations in ip_route_newports(), we take
the address informations from the the rt_key_src and rt_key_dst fields
of the rtable. They appear to be empty. So take the address
informations from rt_src and rt_dst instead. This issue was introduced
by commit 5e2b61f ("ipv4: Remove
flowi from struct rtable.")

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Steffen Klassert authored and David S. Miller committed Mar 25, 2011
1 parent 37e826c commit 6df59a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/net/route.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ static inline struct rtable *ip_route_newports(struct rtable *rt,
struct flowi4 fl4 = {
.flowi4_oif = rt->rt_oif,
.flowi4_mark = rt->rt_mark,
.daddr = rt->rt_key_dst,
.saddr = rt->rt_key_src,
.daddr = rt->rt_dst,
.saddr = rt->rt_src,
.flowi4_tos = rt->rt_tos,
.flowi4_proto = protocol,
.fl4_sport = sport,
Expand Down

0 comments on commit 6df59a8

Please sign in to comment.