提交 3d6d30d6 编写于 作者: J Jiri Benc 提交者: David S. Miller

cxgbi: fix uninitialized flowi6

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: NJiri Benc <jbenc@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 841645b5
...@@ -688,6 +688,7 @@ static struct rt6_info *find_route_ipv6(const struct in6_addr *saddr, ...@@ -688,6 +688,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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部