BelledonneCommunications / flexisip

Linphone.org mirror for flexisip (git://git.linphone.org/flexisip.git)
http://flexisip.org
GNU Affero General Public License v3.0
140 stars 68 forks source link

NatHelper bad private ip range #134

Open oguilbaud opened 2 years ago

oguilbaud commented 2 years ago

In src/module-nat-helper.cc

The method :

       bool isPrivateAddress(const char *host) {
        return strstr(host, "10.") == host || strstr(host, "192.168.") == host || strstr(host, "176.12.") == host;
    }

use a bad private ip range address to define if private or not. the RFC1918 #3 define this range

Class Private Address Range
A 10.0.0.0 to 10.255.255.255
B 172.16.0.0 to 172.31.255.255
C 192.168.0.0 to 192.168.255.255