Commit e55a8822 authored by Jiri Benc's avatar Jiri Benc Committed by Kleber Sacilotto de Souza

cxgbi: fix uninitialized flowi6

BugLink: https://bugs.launchpad.net/bugs/1878232

commit 3d6d30d6 upstream.

ip6_route_output looks into different fields in the passed flowi6 structure,
yet cxgbi passes garbage in nearly all those fields. Zero the structure out
first.

Fixes: fc8d0590 ("libcxgbi: Add ipv6 api to driver")
Signed-off-by: default avatarJiri Benc <jbenc@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarIan May <ian.may@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 9d67a3e5
...@@ -692,6 +692,7 @@ static struct rt6_info *find_route_ipv6(const struct in6_addr *saddr, ...@@ -692,6 +692,7 @@ static struct rt6_info *find_route_ipv6(const struct in6_addr *saddr,
{ {
struct flowi6 fl; struct flowi6 fl;
memset(&fl, 0, sizeof(fl));
if (saddr) if (saddr)
memcpy(&fl.saddr, saddr, sizeof(struct in6_addr)); memcpy(&fl.saddr, saddr, sizeof(struct in6_addr));
if (daddr) if (daddr)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment