Correctly match network.
This commit is contained in:
parent
6dc14451f4
commit
d5e0a358f1
1 changed files with 1 additions and 1 deletions
|
@ -105,7 +105,7 @@ match_net (const grub_net_network_level_netaddress_t *net,
|
|||
{
|
||||
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)
|
||||
== (grub_be_to_cpu32 (addr->ipv4) & mask));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue