projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
54079bd
)
Hostlookup() is actually being called now.
author
Guus Sliepen
<guus@tinc-vpn.org>
Sun, 25 Jun 2000 16:20:27 +0000
(16:20 +0000)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Sun, 25 Jun 2000 16:20:27 +0000
(16:20 +0000)
src/net.c
patch
|
blob
|
history
src/protocol.c
patch
|
blob
|
history
diff --git
a/src/net.c
b/src/net.c
index
f1c1590
..
57c61cc
100644
(file)
--- 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.
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.
5 2000/06/25 16:20:27
guus Exp $
*/
#include "config.h"
*/
#include "config.h"
@@
-754,14
+754,15
@@
cp
}
p->real_ip = ntohl(ci.sin_addr.s_addr);
}
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;
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)
{
if(send_basic_info(p) < 0)
{
diff --git
a/src/protocol.c
b/src/protocol.c
index
e772d04
..
e34ee40
100644
(file)
--- a/
src/protocol.c
+++ b/
src/protocol.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.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: protocol.c,v 1.28.4.
4 2000/06/25 16:01:12
guus Exp $
+ $Id: protocol.c,v 1.28.4.
5 2000/06/25 16:20:27
guus Exp $
*/
#include "config.h"
*/
#include "config.h"
@@
-230,7
+230,7
@@
int send_basic_info(conn_list_t *cl)
{
cp
if(debug_lvl > 1)
{
cp
if(debug_lvl > 1)
- syslog(LOG_DEBUG, _("Sending BASIC_INFO to
" IP_ADDR_S
),
+ syslog(LOG_DEBUG, _("Sending BASIC_INFO to
%s"
),
cl->hostname);
buflen = snprintf(buffer, MAXBUFSIZE, "%d %d %lx/%lx:%x %d\n", BASIC_INFO, PROT_CURRENT, myself->vpn_ip, myself->vpn_mask, myself->port, myself->flags);
cl->hostname);
buflen = snprintf(buffer, MAXBUFSIZE, "%d %d %lx/%lx:%x %d\n", BASIC_INFO, PROT_CURRENT, myself->vpn_ip, myself->vpn_mask, myself->port, myself->flags);
@@
-396,7
+396,7
@@
int basic_info_h(conn_list_t *cl)
{
cp
if(debug_lvl > 1)
{
cp
if(debug_lvl > 1)
- syslog(LOG_DEBUG, _("Got BASIC_INFO from
" IP_ADDR_S
), cl->hostname);
+ syslog(LOG_DEBUG, _("Got BASIC_INFO from
%s"
), cl->hostname);
if(sscanf(cl->buffer, "%*d %d %lx/%lx:%hx %d", &cl->protocol_version, &cl->vpn_ip, &cl->vpn_mask, &cl->port, &cl->flags) != 5)
{
if(sscanf(cl->buffer, "%*d %d %lx/%lx:%hx %d", &cl->protocol_version, &cl->vpn_ip, &cl->vpn_mask, &cl->port, &cl->flags) != 5)
{