Skip to contentSkip to conversation

net: Initialize flow flags in input path

PATCH Applied David Ahern 2 participants 2 messages Sep 30, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: Initialize flow flags in input path

The fib_table_lookup tracepoint found 2 places where the flowi4_flags is not initialized.

---
 net/ipv4/fib_frontend.c | 1 +
 net/ipv4/route.c        | 1 +
 2 files changed, 2 insertions(+)
net/ipv4/fib_frontend.c +1 -0
index 6fcbd215cdbc..690bcbc59f26 100644
@@ -340,6 +340,7 @@ static int __fib_validate_source(struct sk_buff *skb, __be32 src, __be32 dst,
 	fl4.flowi4_tos = tos;
 	fl4.flowi4_scope = RT_SCOPE_UNIVERSE;
 	fl4.flowi4_tun_key.tun_id = 0;
+	fl4.flowi4_flags = 0;
 
 	no_addr = idev->ifa_list == NULL;
 
net/ipv4/route.c +1 -0
index 8c84a6664b30..13ac8d012aa7 100644
@@ -1743,6 +1743,7 @@ static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr,
 	fl4.flowi4_mark = skb->mark;
 	fl4.flowi4_tos = tos;
 	fl4.flowi4_scope = RT_SCOPE_UNIVERSE;
+	fl4.flowi4_flags = 0;
 	fl4.daddr = daddr;
 	fl4.saddr = saddr;
 	err = fib_lookup(net, &fl4, &res, 0);
Signature · 1 line
1.9.1