|
@@ -1510,6 +1510,8 @@ send_keepalive(NAT_Contact *contact)
|
|
struct dest_info dst;
|
|
struct dest_info dst;
|
|
int nat_port, len;
|
|
int nat_port, len;
|
|
str nat_ip;
|
|
str nat_ip;
|
|
|
|
+ unsigned short lport;
|
|
|
|
+ char lproto;
|
|
|
|
|
|
if (keepalive_params.from == NULL) {
|
|
if (keepalive_params.from == NULL) {
|
|
if (contact->socket != last_socket) {
|
|
if (contact->socket != last_socket) {
|
|
@@ -1554,7 +1556,9 @@ send_keepalive(NAT_Contact *contact)
|
|
ptr = strchr(nat_ip.s, ':');
|
|
ptr = strchr(nat_ip.s, ':');
|
|
nat_ip.len = ptr - nat_ip.s;
|
|
nat_ip.len = ptr - nat_ip.s;
|
|
nat_port = strtol(ptr+1, NULL, 10);
|
|
nat_port = strtol(ptr+1, NULL, 10);
|
|
- hostent = sip_resolvehost(&nat_ip, NULL, NULL);
|
|
|
|
|
|
+ lport = 0;
|
|
|
|
+ lproto = PROTO_NONE;
|
|
|
|
+ hostent = sip_resolvehost(&nat_ip, &lport, &lproto);
|
|
hostent2su(&dst.to, hostent, 0, nat_port);
|
|
hostent2su(&dst.to, hostent, 0, nat_port);
|
|
dst.proto=PROTO_UDP;
|
|
dst.proto=PROTO_UDP;
|
|
dst.send_sock=contact->socket;
|
|
dst.send_sock=contact->socket;
|