From 11127101c97c5ea55338d1e009b823bcba922db6 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 28 Mar 2018 07:54:22 +0200 Subject: [PATCH] Revert "use new session per ICMP ID" This reverts commit a8bc2b4a33e9c309b04027c31d8cf4265994a53c. --- app/src/main/jni/netguard/icmp.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/src/main/jni/netguard/icmp.c b/app/src/main/jni/netguard/icmp.c index 1037d62a..35232cd2 100644 --- a/app/src/main/jni/netguard/icmp.c +++ b/app/src/main/jni/netguard/icmp.c @@ -115,10 +115,8 @@ void check_icmp_socket(const struct arguments *args, const struct epoll_event *e icmp->icmp_type, icmp->icmp_code, s->icmp.id, icmp->icmp_id, icmp->icmp_seq); - //restore original ID: without below hack the ICMP response will not get accepted from requestor - // have searched in "SoftEther4" source codes and they this too in "Virtual.c" for ICMP_TYPE_ECHO_RESPONSE + // restore original ID icmp->icmp_id = s->icmp.id; - uint16_t csum = 0; if (s->icmp.version == 6) { // Untested @@ -176,7 +174,6 @@ jboolean handle_icmp(const struct arguments *args, while (cur != NULL && !((cur->protocol == IPPROTO_ICMP || cur->protocol == IPPROTO_ICMPV6) && !cur->icmp.stop && cur->icmp.version == version && - cur->icmp.id == icmp->icmp_id && (version == 4 ? cur->icmp.saddr.ip4 == ip4->saddr && cur->icmp.daddr.ip4 == ip4->daddr : memcmp(&cur->icmp.saddr.ip6, &ip6->ip6_src, 16) == 0 &&