]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
PROTO_TCPv4 is never used as an index into
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Wed, 8 Nov 2006 01:05:19 +0000 (01:05 +0000)
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Wed, 8 Nov 2006 01:05:19 +0000 (01:05 +0000)
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

socket.c
socket.h

index a37229536db20c653be422c7446f81bb5cb6d426..70d8ffd87d835d24371ca09b5a14262449dd7307 100644 (file)
--- a/socket.c
+++ b/socket.c
 
 #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.
  */
index f0d9a43747dd70bcf654ea4a45c64fd698bd3c2e..28bf41f8b7021ba8d39d0f6f8769d91e00d05ec2 100644 (file)
--- 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)