Software /
code /
prosody
Changeset
8439:293dbb08427b
util.ip: Add CGNAT network range reserved in RFC 6598
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 01 Dec 2017 03:13:52 +0100 |
parents | 8438:499663bd0122 |
children | 8440:4e6710b4f873 |
files | util/ip.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/util/ip.lua Fri Dec 01 03:31:37 2017 +0100 +++ b/util/ip.lua Fri Dec 01 03:13:52 2017 +0100 @@ -207,11 +207,12 @@ local rfc1918_8 = new_ip("10.0.0.0"); local rfc1918_12 = new_ip("172.16.0.0"); local rfc1918_16 = new_ip("192.168.0.0"); +local rfc6598 = new_ip("100.64.0.0"); function ip_methods:private() local private = self.scope ~= 0xE; if not private and self.proto == "IPv4" then - private = match(self, rfc1918_8, 8) or match(self, rfc1918_12, 12) or match(self, rfc1918_16); + private = match(self, rfc1918_8, 8) or match(self, rfc1918_12, 12) or match(self, rfc1918_16) or match(self, rfc6598, 10); end self.private = private; return private;