[Swan] Is left=victor.vouters.dyndns.org actually invalid ????
Philippe Vouters
philippe.vouters at laposte.net
Mon Jan 7 19:32:55 EET 2013
left=victor.vouters.dyndns.org is treated by confread as KH_IPHOSTNAME
= 7, /* host_addr invalid, only string */
This is because of this code extract in validate_end:
case KH_IPADDR:
assert(end->strings[KSCF_IP] != NULL);
if (end->strings[KSCF_IP][0]=='%') {
if (end->iface) free(end->iface);
end->iface = xstrdup(end->strings[KSCF_IP]+1);
if (starter_iface_find(end->iface, family, &(end->addr),
&(end->nexthop)) == -1) {
conn_st->state = STATE_INVALID;
}
/* not numeric, so set the type to the iface type */
end->addrtype = KH_IFACE;
break;
}
er = ttoaddr_num(end->strings[KNCF_IP], 0, family, &(end->addr));
if(er) {
/* not numeric, so set the type to the string type */
end->addrtype = KH_IPHOSTNAME;
}
if(end->id == NULL) {
char idbuf[ADDRTOT_BUF];
addrtot(&end->addr, 0, idbuf, sizeof(idbuf));
end->id=clone_str(idbuf, "end if");
}
break;
Why it excludes a call to
er = ttoaddr(end->strings[KSCF_IP], 0, family, &(end->addr));
remains a mystery for me !!!!
--
Philippe Vouters (Fontainebleau/France)
URL: http://vouters.dyndns.org/
SIP: sip:Vouters at sip.linphone.org
More information about the Swan
mailing list