Skip to contentSkip to conversation

remove function is_proto_tcp()

PATCH In review Heiko Hund 3 participants 3 messages Aug 18, 2011 – Aug 24, 2011

lore
Share & tools
lore

Heiko Hund

author
#0 lore raw

PATCH 1/1 remove function is_proto_tcp()

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.

---
 options.c |    2 +-
 socket.h  |    6 ------
 2 files changed, 1 insertions(+), 7 deletions(-)
options.c +1 -1
index 77e7c7f..902cc81 100644
@@ -2409,7 +2409,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;
 }
 
socket.h +0 -6
index 33da53c..6336f92 100644
@@ -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)
 {
Signature · 1 line
1.7.5.4
#1 lore raw

Hi,

Quoted 4 lines · Heiko Hund

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.

ACK.

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...
#2 lore raw
In reply to Heiko Hund

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 18/08/11 12:16, Heiko Hund wrote:

| 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<[email protected]...>

Applied to testing and stable master branches.

commit 834eba7597e2582c44f69e03a762b838308c8df0

kind regards,

David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk5U9T4ACgkQDC186MBRfrrFjwCfYEujAn3CRSQGvbxGTV4BK712 nG0Anj+Fpt0GSML97nf104WVnvMVVdbA
=EYty
-----END PGP SIGNATURE-----