mirror of
https://github.com/transmission/transmission
synced 2025-01-31 03:12:44 +00:00
(squash later) blocklist cidr endianness
This commit is contained in:
parent
f61306f65f
commit
94ee776113
1 changed files with 3 additions and 3 deletions
|
@ -319,13 +319,13 @@ static bool parseLine3(char const* line, struct tr_ipv4_range* range) {
|
|||
return false;
|
||||
}
|
||||
|
||||
/* do it in the network order */
|
||||
/* this is host order */
|
||||
mask <<= 32 - pflen;
|
||||
ip_u = ip[0] << 24 | ip[1] << 16 | ip[2] << 8 | ip[3];
|
||||
|
||||
/* fill the non-prefix bits the way we need it */
|
||||
range->begin = ntohl(ip_u & mask);
|
||||
range->end = ntohl(ip_u | (~mask));
|
||||
range->begin = ip_u & mask;
|
||||
range->end = ip_u | (~mask);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue