[sr-dev] [kamailio/kamailio] IPOPS detailed_ip_type: wrong for PRIVATE IP (#1906)

homer5000 notifications at github.com
Tue Mar 26 13:27:49 CET 2019


### Description

I use the detailed_ipv4_type func from the ipops module for determine the source IP of the request:
```
# check src ip
if (detailed_ip_type("$si", "$var(src_t)")) {
    xlog("L_INFO","Sourece IP address ($si) is of detailed type: $var(src_t)\n");
    ...
```
When $si = 172.22.32.140 detailed_ip_type return PUBLIC, but it is PRIVATE.

#### Log Messages

```
INFO: <script>: Sourece IP address (172.22.32.140) is of detailed type: PUBLIC
```

### Additional Information

Maybe the reason is here:
modules / ipops / detailed_ip_type.c
```
(Lucian Balaceanu         2016-09-01 18:39:55 +0300 48)
     { 0xac100000,  "PRIVATE",    0xfffe0000 },  // 172.16/12
```
Maybe fffe should be fff0 - it's /15 now.. so 172.16 and 172.17 only match.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1906
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20190326/af62ea34/attachment.html>


More information about the sr-dev mailing list