Skip to content

Commit

Permalink
Merge pull request #14393 from rgacogne/port-mask
Browse files Browse the repository at this point in the history
AddressAndPortRange: Make it clearer only low-order bits matter to us
  • Loading branch information
rgacogne authored Jun 28, 2024
2 parents 9209f86 + 8d5ebff commit 19090fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pdns/iputils.hh
Original file line number Diff line number Diff line change
Expand Up @@ -1708,7 +1708,7 @@ public:

uint16_t port = d_addr.getPort();
if (d_portMask < 16) {
uint16_t mask = ~(0xFFFF >> d_portMask);
auto mask = static_cast<uint16_t>(~(0xFFFF >> d_portMask));
port = port & mask;
}

Expand Down

0 comments on commit 19090fb

Please sign in to comment.