[SR-Users] LCR - too few dots/colons

Juha Heinanen jh at tutpro.com
Sun Jun 11 15:25:36 CEST 2017


Annus Fictus writes:

> on ip_addr field the value is a normal IPv4 address like 1.2.3.4
> 
> The gw_uri_avp befor call next_gws is:
> 
> '1|sip:|0|||253719602||5060||;transport=udp|0'

That looks fine and these are just debug messages:

> DEBUG: lcr [../../core/resolve.h:258]: str2ip(): str2ip: ERROR: too few 
> dots in [253719602]
> DEBUG: lcr [../../core/resolve.h:355]: str2ip6(): str2ip6: ERROR: too 
> few colons in [253719602]

The code first tries if address field (in this case 253719602) contains
an ip 4 or 6 address string and, if not, takes int from the field and
places it into addr struct:

    if (s.len > 0) {
	if ((ip = str2ip(&s)) != NULL)
	    *addr = *ip;
	else if ((ip = str2ip6(&s)) != NULL)
	    *addr = *ip;
	else {
	    str2int(&s, &u);
	    addr->af = AF_INET;
	    addr->len = 4;
	    addr->u.addr32[0] = u;
	}
    } else {
	addr->af = 0;
    }

-- Juha



More information about the sr-users mailing list