X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet.c;h=72d7bfbd3dc123197b180f93de2ce132746f741b;hp=f1c159064b6e4513474560aaad453b52f55485ee;hb=b3681ebf6c255daf082ed254282cbf493af8fa93;hpb=54079bdf03e74c686f556f86082b9d14b5be227c diff --git a/src/net.c b/src/net.c index f1c15906..72d7bfbd 100644 --- a/src/net.c +++ b/src/net.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: net.c,v 1.35.4.4 2000/06/25 16:01:11 guus Exp $ + $Id: net.c,v 1.35.4.6 2000/06/26 17:20:58 guus Exp $ */ #include "config.h" @@ -535,7 +535,8 @@ int setup_outgoing_connection(ip_t ip) cp ncn = new_conn_list(); ncn->real_ip = ip; - + ncn->hostname = hostlookup(htonl(ip)); + if(setup_outgoing_meta_socket(ncn) < 0) { syslog(LOG_ERR, _("Could not set up a meta connection!")); @@ -567,6 +568,7 @@ cp } myself->vpn_ip = cfg->data.ip->ip; + myself->hostname = hostlookup(htonl(myself->vpn_ip)); myself->vpn_mask = cfg->data.ip->mask; myself->flags = 0; @@ -754,14 +756,15 @@ cp } p->real_ip = ntohl(ci.sin_addr.s_addr); + p->hostname = hostlookup(ci.sin_addr.s_addr); p->meta_socket = sfd; p->status.meta = 1; p->buflen = 0; p->last_ping_time = time(NULL); p->want_ping = 0; - syslog(LOG_NOTICE, _("Connection from " IP_ADDR_S ":%d"), - IP_ADDR_V(p->real_ip), htons(ci.sin_port)); + syslog(LOG_NOTICE, _("Connection from %s port %d"), + p->hostname, htons(ci.sin_port)); if(send_basic_info(p) < 0) {