提交 1e8aa6f1 编写于 作者: A Al Viro 提交者: David S. Miller

[IPV4] bug: open-coded inet_make_mask() in fib_semantic_match() is broken

... and works only on little-endian
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1ef1b8c8
...@@ -914,8 +914,7 @@ int fib_semantic_match(struct list_head *head, const struct flowi *flp, ...@@ -914,8 +914,7 @@ int fib_semantic_match(struct list_head *head, const struct flowi *flp,
res->fi = fa->fa_info; res->fi = fa->fa_info;
#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED #ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED
res->netmask = mask; res->netmask = mask;
res->network = zone & res->network = zone & inet_make_mask(prefixlen);
(0xFFFFFFFF >> (32 - prefixlen));
#endif #endif
atomic_inc(&res->fi->fib_clntref); atomic_inc(&res->fi->fib_clntref);
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册