~smoser/ubuntu/oneiric/openvpn/lp-794916

« back to all changes in this revision

Viewing changes to forward.c

  • Committer: Bazaar Package Importer
  • Author(s): Alberto Gonzalez Iniesta
  • Date: 2008-07-23 10:38:13 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20080723103813-axq5wohvwjr4jo0s
Tags: 2.1~rc8-1
* New upstream version
* Added Build-dep on libpkcs11-helper1 to re-enable PKCS#11
  support. Sorry for the delay Florian :) (Closes: #475353)

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *             packet encryption, packet authentication, and
6
6
 *             packet compression.
7
7
 *
8
 
 *  Copyright (C) 2002-2005 OpenVPN Solutions LLC <info@openvpn.net>
 
8
 *  Copyright (C) 2002-2008 OpenVPN Solutions LLC <info@openvpn.net>
9
9
 *
10
10
 *  This program is free software; you can redistribute it and/or modify
11
11
 *  it under the terms of the GNU General Public License version 2
22
22
 *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23
23
 */
24
24
 
25
 
#ifdef WIN32
26
 
#include "config-win32.h"
27
 
#else
28
 
#include "config.h"
29
 
#endif
30
 
 
31
25
#include "syshead.h"
32
26
 
33
27
#include "forward.h"
89
83
 
90
84
  if (interval_test (&c->c2.tmp_int))
91
85
    {
92
 
      if (tls_multi_process
93
 
          (c->c2.tls_multi, &c->c2.to_link, &c->c2.to_link_addr,
94
 
           get_link_socket_info (c), &wakeup))
 
86
      const int tmp_status = tls_multi_process
 
87
        (c->c2.tls_multi, &c->c2.to_link, &c->c2.to_link_addr,
 
88
         get_link_socket_info (c), &wakeup);
 
89
      if (tmp_status == TLSMP_ACTIVE)
95
90
        {
96
91
          update_time ();
97
92
          interval_action (&c->c2.tmp_int);
98
93
        }
 
94
      else if (tmp_status == TLSMP_KILL)
 
95
        {
 
96
          c->sig->signal_received = SIGTERM;
 
97
          c->sig->signal_text = "auth-control-exit";
 
98
        }
99
99
 
100
100
      interval_future_trigger (&c->c2.tmp_int, wakeup);
101
101
    }
356
356
  if (lsi->mtu_changed && c->c2.ipv4_tun)
357
357
    {
358
358
      frame_adjust_path_mtu (&c->c2.frame_fragment, c->c2.link_socket->mtu,
359
 
                             c->options.proto);
 
359
                             c->options.ce.proto);
360
360
      lsi->mtu_changed = false;
361
361
    }
362
362
 
492
492
  check_push_request (c);
493
493
#endif
494
494
 
 
495
#ifdef PLUGIN_PF
 
496
  pf_check_reload (c);
 
497
#endif
 
498
 
495
499
  /* process --route options */
496
500
  check_add_routes (c);
497
501
 
1034
1038
#ifdef HAVE_GETTIMEOFDAY
1035
1039
          if (c->options.shaper)
1036
1040
            shaper_wrote_bytes (&c->c2.shaper, BLEN (&c->c2.to_link)
1037
 
                                + datagram_overhead (c->options.proto));
 
1041
                                + datagram_overhead (c->options.ce.proto));
1038
1042
#endif
1039
1043
          /*
1040
1044
           * Let the pinger know that we sent a packet.