[IPV4] bug: open-coded inet_make_mask() in fib_semantic_match() is broken
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 27 Sep 2006 05:21:22 +0000 (22:21 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Fri, 29 Sep 2006 01:01:13 +0000 (18:01 -0700)
... and works only on little-endian

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fib_semantics.c

index 66b78df1c67208fbae6de7c58a8b44220650a82e..f7567e92cd9e297e68219ee2ba71c5e4d0307106 100644 (file)
@@ -914,8 +914,7 @@ out_fill_res:
        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;