Skip to content

Commit

Permalink
add CGNAT iprange in RFC6598 to isPrivate
Browse files Browse the repository at this point in the history
Summary:
These iprange should be generally considerred as private ip range used inside ISP network for cgnat purpose.

 {F1973438807}
then
https://www.browserling.com/tools/ip-to-hex
https://www.browserling.com/tools/hex-to-ip

Reviewed By: jda

Differential Revision: D66847687

fbshipit-source-id: 9f74144e53b017b2e5b3e2a7de13346c0d12b67e
  • Loading branch information
Tianyi Cheng authored and facebook-github-bot committed Dec 7, 2024
1 parent 30fc8cb commit cd29fb2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions folly/IPAddressV4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ bool IPAddressV4::isPrivate() const {
(ip >= 0xA9FE0000 && ip <= 0xA9FEFFFF) || // 169.254.0.0-169.254.255.255
(ip >= 0xAC100000 && ip <= 0xAC1FFFFF) || // 172.16.0.0-172.31.255.255
(ip >= 0xC0A80000 && ip <= 0xC0A8FFFF) || // 192.168.0.0-192.168.255.255
(ip >= 0x64400000 && ip <= 0x647fffff) || // 100.64.0.0-100.127.255.255
false;
}

Expand Down

0 comments on commit cd29fb2

Please sign in to comment.