From 8b06c61a70b63cacf1632404d6ff6100f4915d6b Mon Sep 17 00:00:00 2001 From: goldsimon Date: Mon, 5 Dec 2011 20:58:51 +0100 Subject: [PATCH] fixed bug #33398 (pointless conversion when checking TCP port range) --- CHANGELOG | 2 ++ src/core/tcp.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 29518303..1c69a313 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -13,6 +13,8 @@ HISTORY ++ Bugfixes: + 2011-05-25: Simon Goldschmidt + * tcp.c: fixed bug #33398 (pointless conversion when checking TCP port range) diff --git a/src/core/tcp.c b/src/core/tcp.c index c629bc4e..55902600 100644 --- a/src/core/tcp.c +++ b/src/core/tcp.c @@ -619,7 +619,7 @@ tcp_new_port(void) static u16_t port = TCP_LOCAL_PORT_RANGE_START; again: - if (port++ >= TCP_LOCAL_PORT_RANGE_END) { + if (port++ == TCP_LOCAL_PORT_RANGE_END) { port = TCP_LOCAL_PORT_RANGE_START; } /* Check all PCB lists. */