mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 06:49:35 +00:00
Correctly match network.
This commit is contained in:
1 parent
6dc14451f4
commit
d5e0a358f1
1 file changed
+1
-1
+1
-1
@@ -105,7 +105,7 @@ match_net (const grub_net_network_level_netaddress_t *net,
|
|||||||
{
|
{
|
||||||
case GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV4:
|
case GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV4:
|
||||||
{
|
{
|
||||||
grub_int32_t mask = (1 << net->ipv4.masksize) - 1;
|
grub_int32_t mask = ((1 << net->ipv4.masksize) - 1) << (32 - net->ipv4.masksize);
|
||||||
return ((grub_be_to_cpu32 (net->ipv4.base) & mask)
|
return ((grub_be_to_cpu32 (net->ipv4.base) & mask)
|
||||||
== (grub_be_to_cpu32 (addr->ipv4) & mask));
|
== (grub_be_to_cpu32 (addr->ipv4) & mask));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user