2951972 - make vtund quiet about connections (Sean MacLennan)
This commit is contained in:
parent
408c943518
commit
9b1834fd2c
@ -9,6 +9,7 @@
|
||||
Add description of "keepalive timeout:count;" syntax
|
||||
to man page and vtund.conf sample.
|
||||
Remove doubled if(send_a_file){...} block in linkfd.c.
|
||||
pat2951972 - reduce connection chatter
|
||||
|
||||
3.0.2:
|
||||
rfe1685781 - vtun3 client should parse vtun2 server encr directives (hch)
|
||||
|
3
Credits
3
Credits
@ -156,3 +156,6 @@ Sergey Popov (Pinkbyte) <@pinkbyte.ru>
|
||||
Eugene Berdnikov
|
||||
Link timeout in UDP mode (deb339364)
|
||||
Types cleanup
|
||||
|
||||
Sean MacLennan
|
||||
Reduce connection chatter
|
||||
|
8
client.c
8
client.c
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: client.c,v 1.11.2.2 2008/01/07 22:35:27 mtbishop Exp $
|
||||
* $Id: client.c,v 1.11.2.3 2012/07/08 05:32:57 mtbishop Exp $
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -126,10 +126,12 @@ void client(struct vtun_host *host)
|
||||
io_init();
|
||||
|
||||
set_title("%s connecting to %s", host->host, vtun.svr_name);
|
||||
vtun_syslog(LOG_INFO,"Connecting to %s", vtun.svr_name);
|
||||
if (!vtun.quiet)
|
||||
vtun_syslog(LOG_INFO,"Connecting to %s", vtun.svr_name);
|
||||
|
||||
if( connect_t(s,(struct sockaddr *) &svr_addr, host->timeout) ){
|
||||
vtun_syslog(LOG_INFO,"Connect to %s failed. %s(%d)", vtun.svr_name,
|
||||
if (!vtun.quiet || errno != ETIMEDOUT)
|
||||
vtun_syslog(LOG_INFO,"Connect to %s failed. %s(%d)", vtun.svr_name,
|
||||
strerror(errno), errno);
|
||||
} else {
|
||||
if( auth_client(s, host) ){
|
||||
|
7
main.c
7
main.c
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: main.c,v 1.9.2.4 2012/07/07 07:14:17 mtbishop Exp $
|
||||
* $Id: main.c,v 1.9.2.5 2012/07/08 05:32:57 mtbishop Exp $
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -92,7 +92,7 @@ int main(int argc, char *argv[], char *env[])
|
||||
/* Start logging to syslog and stderr */
|
||||
openlog("vtund", LOG_PID | LOG_NDELAY | LOG_PERROR, LOG_DAEMON);
|
||||
|
||||
while( (opt=getopt(argc,argv,"misf:P:L:t:np")) != EOF ){
|
||||
while( (opt=getopt(argc,argv,"misf:P:L:t:npq")) != EOF ){
|
||||
switch(opt){
|
||||
case 'm':
|
||||
if (mlockall(MCL_CURRENT | MCL_FUTURE) < 0) {
|
||||
@ -123,6 +123,9 @@ int main(int argc, char *argv[], char *env[])
|
||||
case 't':
|
||||
vtun.timeout = atoi(optarg);
|
||||
break;
|
||||
case 'q':
|
||||
vtun.quiet = 1;
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
exit(1);
|
||||
|
3
vtun.h
3
vtun.h
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: vtun.h,v 1.12.2.5 2012/07/07 07:14:17 mtbishop Exp $
|
||||
* $Id: vtun.h,v 1.12.2.6 2012/07/08 05:32:57 mtbishop Exp $
|
||||
*/
|
||||
|
||||
#ifndef _VTUN_H
|
||||
@ -219,6 +219,7 @@ struct vtun_opts {
|
||||
struct vtun_addr bind_addr; /* Server should listen on this address */
|
||||
int svr_type; /* Server mode */
|
||||
int syslog; /* Facility to log messages to syslog under */
|
||||
int quiet; /* Be quiet about common errors */
|
||||
};
|
||||
#define VTUN_STAND_ALONE 0
|
||||
#define VTUN_INETD 1
|
||||
|
8
vtund.8
8
vtund.8
@ -1,5 +1,5 @@
|
||||
.\" Manual page for vtund
|
||||
.\" $Id: vtund.8,v 1.6.2.1 2007/06/29 05:26:43 mtbishop Exp $
|
||||
.\" $Id: vtund.8,v 1.6.2.2 2012/07/08 05:32:57 mtbishop Exp $
|
||||
.\" SH section heading
|
||||
.\" SS subsection heading
|
||||
.\" LP paragraph
|
||||
@ -37,6 +37,9 @@ vtund \- VTun(Virtual Tunnel) daemon.
|
||||
.I -p
|
||||
]
|
||||
[
|
||||
.I -q
|
||||
]
|
||||
[
|
||||
.I -m
|
||||
]
|
||||
[
|
||||
@ -101,6 +104,9 @@ Reconnect to the server after connection termination. By default vtund will
|
||||
exit if connection has been terminated. This options is equivalent to
|
||||
the 'persist' option of config file.
|
||||
.TP
|
||||
.I -q
|
||||
Inhibit the printing of connection messages.
|
||||
.TP
|
||||
.I -m
|
||||
Force memory pages to be locked memory-resident to prevent potential VM deadlock. Useful with NFS traffic. This option has no config file equivalent.
|
||||
.TP
|
||||
|
Loading…
Reference in New Issue
Block a user