Skip to content

Commit

Permalink
Private IP detection: Include RFC 1122 addresses (127.0.0.0/8, loopback)
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuchircu committed Mar 2, 2022
1 parent 043d4f3 commit 3962f25
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ip_addr.c
Expand Up @@ -178,6 +178,7 @@ int ip_addr_is_1918(str *s_ip)
{ 0xac100000, 0xffffffffu << 20}, /* "172.16.0.0" RFC 1918 */
{ 0xc0a80000, 0xffffffffu << 16}, /* "192.168.0.0" RFC 1918 */
{ 0x64400000, 0xffffffffu << 22}, /* "100.64.0.0" RFC 6598 */
{ 0x7f000000, 0xffffffffu << 24}, /* "127.0.0.0" RFC 1122 */
{ 0, 0}
};
struct ip_addr *ip;
Expand Down

0 comments on commit 3962f25

Please sign in to comment.