Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e8aa6f1 authored by Al Viro's avatar Al Viro Committed by David S. Miller
Browse files

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



... and works only on little-endian

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1ef1b8c8
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -914,8 +914,7 @@ int fib_semantic_match(struct list_head *head, const struct flowi *flp,
	res->fi = fa->fa_info;
#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED
	res->netmask = mask;
	res->network = zone &
		(0xFFFFFFFF >> (32 - prefixlen));
	res->network = zone & inet_make_mask(prefixlen);
#endif
	atomic_inc(&res->fi->fib_clntref);
	return 0;