]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
remove function is_proto_tcp()
authorHeiko Hund <heiko.hund@sophos.com>
Thu, 18 Aug 2011 10:16:21 +0000 (10:16 +0000)
committerDavid Sommerseth <davids@redhat.com>
Wed, 24 Aug 2011 12:52:47 +0000 (14:52 +0200)
The implementation of is_proto_tcp() was invalid since the IPv6 stuff got
merged into master. There's proto_is_tcp() that does the same job right.

Remove is_proto_tcp() and make its only caller use proto_is_tcp() instead.

Signed-off-by: Heiko Hund <heiko.hund@sophos.com>
Acked-By: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <davids@redhat.com>
options.c
socket.h

index 7da1180f735d24c3853888323479908b69c4592c..5333cfa95d63ae22e9b426d8cf0d4043d403188a 100644 (file)
--- a/options.c
+++ b/options.c
@@ -2417,7 +2417,7 @@ options_postprocess_mutate_ce (struct options *o, struct connection_entry *ce)
     ce->local_port = 0;
 
   /* if protocol forcing is enabled, disable all protocols except for the forced one */
-  if (o->proto_force >= 0 && is_proto_tcp(o->proto_force) != is_proto_tcp(ce->proto))
+  if (o->proto_force >= 0 && proto_is_tcp(o->proto_force) != proto_is_tcp(ce->proto))
     ce->flags |= CE_DISABLED;
 }
 
index 33da53c3702f283e8c121c779dd4e7ac01b17812..6336f9220ed61c08a4b40b33432c70ee7b1eea4b 100644 (file)
--- a/socket.h
+++ b/socket.h
@@ -563,12 +563,6 @@ legal_ipv4_port (int port)
   return port > 0 && port < 65536;
 }
 
-static inline int
-is_proto_tcp(const int p)
-{
-  return p > 0; /* depends on the definition of PROTO_x */
-}
-
 static inline bool
 link_socket_proto_connection_oriented (int proto)
 {