Skip to content

Commit 6df59a8

Browse files
klassertdavem330
authored andcommitted
route: Take the right src and dst addresses in ip_route_newports
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 37e826c commit 6df59a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/net/route.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,8 @@ static inline struct rtable *ip_route_newports(struct rtable *rt,
270270
struct flowi4 fl4 = {
271271
.flowi4_oif = rt->rt_oif,
272272
.flowi4_mark = rt->rt_mark,
273-
.daddr = rt->rt_key_dst,
274-
.saddr = rt->rt_key_src,
273+
.daddr = rt->rt_dst,
274+
.saddr = rt->rt_src,
275275
.flowi4_tos = rt->rt_tos,
276276
.flowi4_proto = protocol,
277277
.fl4_sport = sport,

0 commit comments

Comments
 (0)