Workaround for gogoc and freenet6 keepalive engine problem.

So many years passed, even after end of gogo6 project, still nobody found this out. Does anyone really use gogoc / freenet6 in daily life? Reason? icmp_echo_id in p_engine is uint16_t.

--- gogoc-tsp/src/net/icmp_echo_engine.c~	2016-07-22 15:16:32.382995000 +0800
+++ gogoc-tsp/src/net/icmp_echo_engine.c	2016-07-22 15:16:44.244691000 +0800
@@ -238,7 +238,7 @@
   p_engine->clbk_recv = recv_clbk;

   // Initialize engine socket variables.
-  p_engine->icmp_echo_id = pal_getpid();
+  p_engine->icmp_echo_id = pal_getpid() % 65536;
   p_engine->icmp_saf = af;
   switch( p_engine->icmp_saf )
   {
Advertisements