All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] ipv6: sr: properly initialize flowi6 prior passing to ip6_route_output
@ 2018-12-07  7:50 Shmulik Ladkani
  2018-12-07 20:23 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Shmulik Ladkani @ 2018-12-07  7:50 UTC (permalink / raw)
  To: davem, dlebrun; +Cc: dav.lebrun, netdev, Shmulik Ladkani

In 'seg6_output', stack variable 'struct flowi6 fl6' was missing
initialization.

Fixes: 6c8702c60b88 ("ipv6: sr: add support for SRH encapsulation and injection with lwtunnels")
Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>

---
Suggeting this fix, spotted during code review while experimenting
with SRv6, although havn't encountered a specific issue during
experiments.

Was there any genuine intention to actually keep 'fl6' uninitialized?
---

 net/ipv6/seg6_iptunnel.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/ipv6/seg6_iptunnel.c b/net/ipv6/seg6_iptunnel.c
index a8854dd3e9c5..8181ee7e1e27 100644
--- a/net/ipv6/seg6_iptunnel.c
+++ b/net/ipv6/seg6_iptunnel.c
@@ -347,6 +347,7 @@ static int seg6_output(struct net *net, struct sock *sk, struct sk_buff *skb)
 		struct ipv6hdr *hdr = ipv6_hdr(skb);
 		struct flowi6 fl6;
 
+		memset(&fl6, 0, sizeof(fl6));
 		fl6.daddr = hdr->daddr;
 		fl6.saddr = hdr->saddr;
 		fl6.flowlabel = ip6_flowinfo(hdr);
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] ipv6: sr: properly initialize flowi6 prior passing to ip6_route_output
  2018-12-07  7:50 [PATCH net] ipv6: sr: properly initialize flowi6 prior passing to ip6_route_output Shmulik Ladkani
@ 2018-12-07 20:23 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-12-07 20:23 UTC (permalink / raw)
  To: shmulik; +Cc: dlebrun, dav.lebrun, netdev, shmulik.ladkani

From: Shmulik Ladkani <shmulik@metanetworks.com>
Date: Fri,  7 Dec 2018 09:50:17 +0200

> In 'seg6_output', stack variable 'struct flowi6 fl6' was missing
> initialization.
> 
> Fixes: 6c8702c60b88 ("ipv6: sr: add support for SRH encapsulation and injection with lwtunnels")
> Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>

Applied and queued up for -stable, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-12-07 20:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-07  7:50 [PATCH net] ipv6: sr: properly initialize flowi6 prior passing to ip6_route_output Shmulik Ladkani
2018-12-07 20:23 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.