Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 34341 | Differences between
and this patch

Collapse All | Expand All

(-)openvpn-1.5.0.orig/gentoo/openvpn.init (-1 / +1 lines)
Lines 22-28 Link Here
22
#   service openvpn status - SIGUSR2
22
#   service openvpn status - SIGUSR2
23
23
24
# Location of openvpn binary
24
# Location of openvpn binary
25
openvpn=/usr/local/sbin/openvpn
25
openvpn=/usr/sbin/openvpn
26
26
27
# PID directory
27
# PID directory
28
piddir=/var/run/openvpn
28
piddir=/var/run/openvpn
(-)openvpn-1.5.0.orig/openvpn.8 (+5 lines)
Lines 172-177 Link Here
172
[\ \fB\-\-setenv\fR\ \fIname\ value\fR\ ]
172
[\ \fB\-\-setenv\fR\ \fIname\ value\fR\ ]
173
[\ \fB\-\-shaper\fR\ \fIn\fR\ ]
173
[\ \fB\-\-shaper\fR\ \fIn\fR\ ]
174
[\ \fB\-\-single\-session\fR\ ]
174
[\ \fB\-\-single\-session\fR\ ]
175
[\ \fB\-\-tcp\-retry\fR\ \fIn\fR\ ]
175
[\ \fB\-\-tls\-auth\fR\ \fIf\fR\ ]
176
[\ \fB\-\-tls\-auth\fR\ \fIf\fR\ ]
176
[\ \fB\-\-tls\-cipher\fR\ \fIl\fR\ ]
177
[\ \fB\-\-tls\-cipher\fR\ \fIl\fR\ ]
177
[\ \fB\-\-tls\-client\fR\ ]
178
[\ \fB\-\-tls\-client\fR\ ]
Lines 972-977 Link Here
972
seconds of inactivity on the TUN/TAP device.  The time length
973
seconds of inactivity on the TUN/TAP device.  The time length
973
of inactivity is measured since the last incoming tunnel packet.
974
of inactivity is measured since the last incoming tunnel packet.
974
.TP
975
.TP
976
.B --tcp-retry n
977
The number of seconds before the tcp-client will retry to
978
establish a connection with the tcp-server (default=5).
979
.TP
975
.B --ping n
980
.B --ping n
976
Ping remote over the TCP/UDP control channel
981
Ping remote over the TCP/UDP control channel
977
if no packets have been sent for at least
982
if no packets have been sent for at least
(-)openvpn-1.5.0.orig/openvpn.c (-1 / +1 lines)
Lines 1291-1297 Link Here
1291
    }
1291
    }
1292
1292
1293
  /* finalize the TCP/UDP socket */
1293
  /* finalize the TCP/UDP socket */
1294
  link_socket_init_phase2 (&link_socket, &frame, &signal_received);
1294
  link_socket_init_phase2 (&link_socket, &frame, &signal_received, options->tcp_retry);
1295
  if (signal_received)
1295
  if (signal_received)
1296
    {
1296
    {
1297
      signal_text = "socket";
1297
      signal_text = "socket";
(-)openvpn-1.5.0.orig/options.c (+8 lines)
Lines 128-133 Link Here
128
  "--setenv name value : Set a custom environmental variable to pass to script.\n"
128
  "--setenv name value : Set a custom environmental variable to pass to script.\n"
129
  "--shaper n      : Restrict output to peer to n bytes per second.\n"
129
  "--shaper n      : Restrict output to peer to n bytes per second.\n"
130
  "--inactive n    : Exit after n seconds of inactivity on TUN/TAP device.\n"
130
  "--inactive n    : Exit after n seconds of inactivity on TUN/TAP device.\n"
131
  "--tcp-retry n   : If TCP connection fails, retry every n seconds.\n"
131
  "--ping-exit n   : Exit if n seconds pass without reception of remote ping.\n"
132
  "--ping-exit n   : Exit if n seconds pass without reception of remote ping.\n"
132
  "--ping-restart n: Restart if n seconds pass without reception of remote ping.\n"
133
  "--ping-restart n: Restart if n seconds pass without reception of remote ping.\n"
133
  "--ping-timer-rem: Run the --ping-exit/--ping-restart timer only if we have a\n"
134
  "--ping-timer-rem: Run the --ping-exit/--ping-restart timer only if we have a\n"
Lines 332-337 Link Here
332
{
333
{
333
  CLEAR (*o);
334
  CLEAR (*o);
334
  o->proto = PROTO_UDPv4;
335
  o->proto = PROTO_UDPv4;
336
  o->tcp_retry = 5;
335
#ifdef TUNSETPERSIST
337
#ifdef TUNSETPERSIST
336
  o->persist_mode = 1;
338
  o->persist_mode = 1;
337
#endif
339
#endif
Lines 443-448 Link Here
443
445
444
  SHOW_BOOL (mlock);
446
  SHOW_BOOL (mlock);
445
  SHOW_INT (inactivity_timeout);
447
  SHOW_INT (inactivity_timeout);
448
  SHOW_INT (tcp_retry);
446
  SHOW_INT (ping_send_timeout);
449
  SHOW_INT (ping_send_timeout);
447
  SHOW_INT (ping_rec_timeout);
450
  SHOW_INT (ping_rec_timeout);
448
  SHOW_INT (ping_rec_timeout_action);
451
  SHOW_INT (ping_rec_timeout_action);
Lines 1282-1287 Link Here
1282
      ++i;
1285
      ++i;
1283
      options->inactivity_timeout = positive (atoi (p[1]));
1286
      options->inactivity_timeout = positive (atoi (p[1]));
1284
    }
1287
    }
1288
  else if (streq (p[0], "tcp-retry") && p[1])
1289
    {
1290
      ++i;
1291
      options->tcp_retry = positive (atoi (p[1]));
1292
    }
1285
  else if (streq (p[0], "proto") && p[1])
1293
  else if (streq (p[0], "proto") && p[1])
1286
    {
1294
    {
1287
      ++i;
1295
      ++i;
(-)openvpn-1.5.0.orig/options.h (+1 lines)
Lines 86-91 Link Here
86
86
87
  /* Protocol type (PROTO_UDP or PROTO_TCP) */
87
  /* Protocol type (PROTO_UDP or PROTO_TCP) */
88
  int proto;
88
  int proto;
89
  int tcp_retry;         /* If tcp connection fails, retry every n seconds */
89
90
90
  /* Advanced MTU negotiation and datagram fragmentation options */
91
  /* Advanced MTU negotiation and datagram fragmentation options */
91
  int mtu_discover_type; /* used if OS supports setting Path MTU discovery options on socket */
92
  int mtu_discover_type; /* used if OS supports setting Path MTU discovery options on socket */
(-)openvpn-1.5.0.orig/socket.c (-5 / +6 lines)
Lines 353-362 Link Here
353
		struct sockaddr_in *remote,
353
		struct sockaddr_in *remote,
354
		const char *remote_dynamic,
354
		const char *remote_dynamic,
355
		bool *remote_changed,
355
		bool *remote_changed,
356
		volatile int *signal_received)
356
		volatile int *signal_received,
357
		int try_again_seconds)
357
{
358
{
358
  const int try_again_seconds = 5;
359
360
  msg (M_INFO, "Attempting to establish TCP connection with %s", 
359
  msg (M_INFO, "Attempting to establish TCP connection with %s", 
361
       print_sockaddr (remote));
360
       print_sockaddr (remote));
362
  while (true)
361
  while (true)
Lines 613-619 Link Here
613
void
612
void
614
link_socket_init_phase2 (struct link_socket *sock,
613
link_socket_init_phase2 (struct link_socket *sock,
615
			 const struct frame *frame,
614
			 const struct frame *frame,
616
			 volatile int *signal_received)
615
			 volatile int *signal_received,
616
			 int try_again_seconds)
617
{
617
{
618
  const char *remote_dynamic = NULL;
618
  const char *remote_dynamic = NULL;
619
  bool remote_changed = false;
619
  bool remote_changed = false;
Lines 656-662 Link Here
656
	{
656
	{
657
	  socket_connect (&sock->sd, &sock->lsa->actual,
657
	  socket_connect (&sock->sd, &sock->lsa->actual,
658
			  remote_dynamic, &remote_changed,
658
			  remote_dynamic, &remote_changed,
659
			  signal_received);
659
			  signal_received,
660
			  try_again_seconds);
660
661
661
	  if (*signal_received)
662
	  if (*signal_received)
662
	    return;
663
	    return;
(-)openvpn-1.5.0.orig/socket.h (-1 / +2 lines)
Lines 197-203 Link Here
197
197
198
void link_socket_init_phase2 (struct link_socket *sock,
198
void link_socket_init_phase2 (struct link_socket *sock,
199
			      const struct frame *frame,
199
			      const struct frame *frame,
200
			      volatile int *signal_received);
200
			      volatile int *signal_received,
201
			      int try_again_seconds);
201
202
202
void socket_adjust_frame_parameters (struct frame *frame, int proto);
203
void socket_adjust_frame_parameters (struct frame *frame, int proto);
203
204

Return to bug 34341