summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2006-11-08 01:05:19 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2006-11-08 01:05:19 +0000
commit1406db559be5030c7c4cb8ee2a424e61faafd130 (patch)
treee96c98e55be19ace939b6d94316f8aa1810046c7
parent9913894f53b8a22effa189a7e395929a61786dc4 (diff)
downloadopenvpn-1406db559be5030c7c4cb8ee2a424e61faafd130.tar.gz
openvpn-1406db559be5030c7c4cb8ee2a424e61faafd130.tar.xz
openvpn-1406db559be5030c7c4cb8ee2a424e61faafd130.zip
PROTO_TCPv4 is never used as an index into
proto_overhead, however this should be fixed. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@1434 e7ae566f-a301-0410-adde-c780ea21d3b5
-rw-r--r--socket.c7
-rw-r--r--socket.h6
2 files changed, 8 insertions, 5 deletions
diff --git a/socket.c b/socket.c
index a372295..70d8ffd 100644
--- a/socket.c
+++ b/socket.c
@@ -41,6 +41,13 @@
#include "memdbg.h"
+const int proto_overhead[] = { /* indexed by PROTO_x */
+ IPv4_UDP_HEADER_SIZE,
+ IPv4_TCP_HEADER_SIZE,
+ IPv4_TCP_HEADER_SIZE,
+ IPv4_TCP_HEADER_SIZE
+};
+
/*
* Functions related to the translation of DNS names to IP addresses.
*/
diff --git a/socket.h b/socket.h
index f0d9a43..28bf41f 100644
--- a/socket.h
+++ b/socket.h
@@ -454,11 +454,7 @@ int proto_remote (int proto, bool remote);
#define IPv4_TCP_HEADER_SIZE 40
#define IPv6_UDP_HEADER_SIZE 40
-static const int proto_overhead[] = { /* indexed by PROTO_x */
- IPv4_UDP_HEADER_SIZE,
- IPv4_TCP_HEADER_SIZE,
- IPv4_TCP_HEADER_SIZE
-};
+extern const int proto_overhead[];
static inline int
datagram_overhead (int proto)