~ubuntu-branches/ubuntu/trusty/openvpn/trusty-security

« back to all changes in this revision

Viewing changes to debian/patches/counter_type_for_bytes.patch

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-05-05 03:06:19 UTC
  • mfrom: (10.2.6 sid)
  • Revision ID: james.westby@ubuntu.com-20100505030619-cwre0snhgx1mql53
Tags: 2.1.0-2ubuntu1
* Merge from debian unstable.  Remaining changes:
  + debian/openvpn.init.d:
    - Do not use start-stop-daemon and use </dev/null to avoid blocking boot
    - Show per-VPN result messages
    - Add "--script-security 2" by default for backwards compatablitiy
   + debian/control: Add lsb-base >= 3.2-14 to allow status_of_proc() 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Index: openvpn-2.1.0/ssl.c
 
2
===================================================================
 
3
--- openvpn-2.1.0.orig/ssl.c    2010-04-10 16:54:33.444694726 +0200
 
4
+++ openvpn-2.1.0/ssl.c 2010-04-10 16:54:57.552723663 +0200
 
5
@@ -3752,7 +3752,8 @@
 
6
           && ks->n_packets >= session->opt->renegotiate_packets)
 
7
        || (packet_id_close_to_wrapping (&ks->packet_id.send))))
 
8
     {
 
9
-      msg (D_TLS_DEBUG_LOW, "TLS: soft reset sec=%d bytes=%d/%d pkts=%d/%d",
 
10
+      msg (D_TLS_DEBUG_LOW,
 
11
+           "TLS: soft reset sec=%d bytes=" counter_format "/%d pkts=" counter_format "/%d",
 
12
           (int)(ks->established + session->opt->renegotiate_seconds - now),
 
13
           ks->n_bytes, session->opt->renegotiate_bytes,
 
14
           ks->n_packets, session->opt->renegotiate_packets);
 
15
Index: openvpn-2.1.0/ssl.h
 
16
===================================================================
 
17
--- openvpn-2.1.0.orig/ssl.h    2010-04-10 16:54:35.812695474 +0200
 
18
+++ openvpn-2.1.0/ssl.h 2010-04-10 16:54:57.576727135 +0200
 
19
@@ -376,8 +376,8 @@
 
20
   struct reliable *rec_reliable;  /* order incoming ciphertext packets before we pass to TLS */
 
21
   struct reliable_ack *rec_ack;          /* buffers all packet IDs we want to ACK back to sender */
 
22
 
 
23
-  int n_bytes;                  /* how many bytes sent/recvd since last key exchange */
 
24
-  int n_packets;                /* how many packets sent/recvd since last key exchange */
 
25
+  counter_type n_bytes;                 /* how many bytes sent/recvd since last key exchange */
 
26
+  counter_type n_packets;       /* how many packets sent/recvd since last key exchange */
 
27
 
 
28
   /*
 
29
    * If bad username/password, TLS connection will come up but 'authenticated' will be false.